Moving picture coding device, moving picture coding method, and moving picture coding program, and moving picture decoding device, moving picture decoding method, and moving picture decoding program

ABSTRACT

A motion vector predictor candidate generating unit makes a prediction based on a motion vector of one of coded neighboring blocks that are neighboring to a coding target block in space or time and generates a plurality of motion vector predictor candidates. A motion vector predictor redundant candidate removing unit removes the motion vector predictor candidates having identity among the motion vector predictor candidates predicted based on a coded neighboring block that is neighboring in space from a motion vector predictor candidate list with at least one being left. A motion vector predictor selecting unit selects a motion vector predictor from the plurality of motion vector predictor candidates. A first bitstream generating unit codes information representing the selected motion vector predictor.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Divisional of U.S. patent application Ser. No.14/298,542, filed Jun. 6, 2014, which is a Continuation of PCTInternational Application No. PCT/JP2012/008325, filed Dec. 26, 2012,which claims the benefit of Japanese Patent Application Nos. 2011-289285and 2011-289286, filed Dec. 28, 2011.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to moving picture coding and decodingtechnologies, and more particularly, to moving picture coding anddecoding technologies using motion compensation.

2. Description of the Related Art

As a representative compression coding system of a moving picture, thereis a specification of MPEG-4 AVC/H. 264 (hereinafter, referred to asAVC). In the AVC, a motion compensation is used in which a picture ispartitioned into rectangular blocks, a picture that has beencoded/decoded is set as a reference picture, and a motion from thereference picture is predicted. A technique predicting a motion inaccordance with such a motion compensation is called an interprediction. In the inter prediction according to the AVC, a plurality ofpictures can be used as reference pictures, the most appropriate pictureis selected from among such a plurality of pictures for each block, andthe motion compensation is performed. A reference index is assigned toeach reference picture, and the reference picture is specified using thereference index. In addition, in a B picture, maximally two pictures areselected from among reference pictures that have been coded/decoded soas to be used for inter predictions. Such predictions made from the tworeference pictures are classified into an L0 prediction (list 0prediction) that is mainly used for a prediction for the forwarddirection and an L1 prediction (list 1 prediction) that is mainly usedfor a prediction for the backward direction.

In addition, a bi-prediction that uses the two inter predictions of theL0 and L1 predictions is defined. In the case of the bi-prediction,bi-directional predictions are made, inter-predicted signals accordingto the L0 and L1 predictions are multiplied by weighting coefficients,and resultant signals overlap each other with offset values being addedthereto, whereby a final inter-prediction picture signal is generated.The weighting coefficients and the offset values used for a weightedprediction are set to representative values in units of pictures foreach reference picture of each list and coded. As coding informationrelating to an inter prediction, for each block, there are a predictionmode specifying both predictions of the L0 prediction and the L1prediction and, for each reference list of each block, a reference indexspecifying a reference picture and a motion vector representing thedirection of motion and the amount of motion of the block, and suchcoding information is coded/decoded.

In a moving picture coding system performing the motion compensation, inorder to reduce the coding amount of a motion vector generated in eachblock, a prediction process is performed for the motion vector.According to the AVC, by using a strong correlation between a motionvector of a coding target and motion vectors of neighboring blocksdisposed on the periphery thereof, a motion vector predictor iscalculated by making a prediction based on the neighboring blocksdisposed on the periphery, a motion vector difference that is adifference between the motion vector of the coding target and the motionvector predictor is calculated, and the motion vector difference iscoded, whereby the coding amount is reduced.

More specifically, as illustrated in FIG. 34A, a median is calculatedbased on motion vectors of neighboring blocks A, B, and C disposed onthe periphery and is set as a motion vector predictor, and a differencebetween a motion vector and the motion vector predictor is taken,whereby the coding amount of the motion vector is reduced. However, asillustrated in FIG. 34B, in a case where the sizes or the shapes of thecoding target block and neighboring blocks are different from eachother, when a plurality of neighboring blocks are present on the leftside, an uppermost block out of the neighboring blocks, or when aplurality of neighboring blocks are present on the upper side, aleftmost block out of the neighboring blocks is set as a predictionblock, and a prediction is made based on the motion vector of thedetermined prediction block.

In addition, according to a technology disclosed in Patent Literature 1,a prediction vector is calculated based on motion vectors of a pluralityof neighboring blocks of a processing target block and reference pictureinformation, and accordingly, the accuracy of the prediction vector isimproved, whereby an increase in the coding amount of a coding vector issuppressed.

CITATION LIST Patent Literature

[Patent Literature 1] Japanese Patent Application Laid-Open No.2011-147172

However, according to the method described in Patent Literature 1, sinceonly one prediction vector is acquired, the prediction accuracy of themotion vector predictor is lowered depending on a picture, and thecoding efficiency may be low.

In such a situation, the inventors of the present invention haverecognized the necessity for decreasing the total coding amount byfurther compressing coding information in a moving picture coding systemusing motion compensation.

SUMMARY OF THE INVENTION

The present invention is contrived in consideration of such a situation,and an object thereof is to provide a moving picture coding and decodingtechnology for improving the coding efficiency by reducing the codingamount of a motion vector difference by calculating candidates for amotion vector predictor. In addition, another object thereof is toprovide a moving picture coding and decoding technology for improvingthe coding efficiency by reducing the coding amount of codinginformation by calculating candidates for the coding information.

In order to solve the problem, a moving picture coding device accordingto an aspect of the invention is one that codes a moving picture usingmotion compensation in units of blocks acquired by dividing each pictureof the moving picture, and the moving picture coding device includes: amotion vector predictor candidate generating unit (121, 122) configuredto derive a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of coded blocks that areneighboring to a coding target block in space or time and construct amotion vector predictor candidate list; a motion vector predictorredundant candidate removing unit (123) configured to remove the motionvector predictor candidates having identity among the motion vectorpredictor candidates predicted based on a coded block that isneighboring in space from the motion vector predictor candidate listwith at least one being left; a motion vector predictor selecting unit(126) configured to select a motion vector predictor from the motionvector predictor candidate list; a differential vector calculating unit(127) configured to calculate a motion vector difference based on adifference between the selected motion vector predictor and the motionvector used for motion compensation; and a coding unit (109) configuredto code information representing the selected motion vector predictortogether with the motion vector difference.

According to another aspect of the present invention, there is alsoprovided a moving picture coding device. This device is a moving picturecoding device that codes a moving picture using motion compensation inunits of blocks acquired by dividing each picture of the moving pictureand includes: a motion vector predictor candidate generating unit (121,122) configured to derive a plurality of motion vector predictorcandidates by making a prediction based on a motion vector of one ofcoded blocks that are neighboring to a coding target block in space ortime and construct a motion vector predictor candidate list; a motionvector predictor redundant candidate removing unit (123) configured toremove the motion vector predictor candidates having a same motionvector value among the motion vector predictor candidates predictedbased on a coded block that is neighboring in space from the motionvector predictor candidate list with one being excluded; a motion vectorpredictor selecting unit (126) configured to select a motion vectorpredictor from the motion vector predictor candidate list; adifferential vector calculating unit (127) configured to calculate amotion vector difference based on a difference between the selectedmotion vector predictor and the motion vector used for motioncompensation; and a coding unit (109) configured to code informationrepresenting the selected motion vector predictor together with themotion vector difference.

According to another aspect of the present invention, there is provideda moving picture coding method. This method is a moving picture codingmethod for coding a moving picture using motion compensation in units ofblocks acquired by dividing each picture of the moving picture andincludes: deriving a plurality of motion vector predictor candidates bymaking a prediction based on a motion vector of one of coded blocks thatare neighboring to a coding target block in space or time andconstructing a motion vector predictor candidate list; removing themotion vector predictor candidates having identity among the motionvector predictor candidates predicted based on a coded block that isneighboring in space from the motion vector predictor candidate listwith at least one being left; selecting a motion vector predictor fromthe motion vector predictor candidate list; calculating a motion vectordifference based on a difference between the selected motion vectorpredictor and the motion vector used for motion compensation; and codinginformation representing the selected motion vector predictor togetherwith the motion vector difference.

According to another aspect of the present invention, there is alsoprovided a moving picture coding method. This method is a moving picturecoding method for coding a moving picture using motion compensation inunits of blocks acquired by dividing each picture of the moving pictureand includes: deriving a plurality of motion vector predictor candidatesby making a prediction based on a motion vector of one of coded blocksthat are neighboring to a coding target block in space or time andconstructing a motion vector predictor candidate list; removing themotion vector predictor candidates having a same motion vector valueamong the motion vector predictor candidates predicted based on a codedblock that is neighboring in space from the motion vector predictorcandidate list with one being excluded; selecting a motion vectorpredictor from the motion vector predictor candidate list; calculating amotion vector difference based on a difference between the selectedmotion vector predictor and the motion vector used for motioncompensation; and coding information representing the selected motionvector predictor together with the motion vector difference.

According to another aspect of the present invention, there is provideda moving picture decoding device that decodes a bitstream in which amoving picture is coded using motion compensation in units of blocksacquired by dividing each picture of the moving picture. The movingpicture decoding device includes: a decoding unit (202) configured todecode information representing a motion vector predictor to be selectedtogether with a motion vector difference; a motion vector predictorcandidate generating unit (221, 222) configured to derive a plurality ofmotion vector predictor candidates by making a prediction based on amotion vector of one of decoded blocks that are neighboring to adecoding target block in space or time and construct a motion vectorpredictor candidate list; a motion vector predictor redundant candidateremoving unit (223) configured to remove the motion vector predictorcandidates having identity among the motion vector predictor candidatespredicted based on a decoded block that is neighboring in space from themotion vector predictor candidate list with at least one being left; amotion vector predictor selecting unit (225) configured to select amotion vector predictor from the motion vector predictor candidate listbased on information representing the decoded motion vector predictor tobe selected; and a motion vector calculating unit (226) configured tocalculate a motion vector used for motion compensation by adding theselected motion vector predictor and the motion vector differencetogether.

According to another aspect of the present invention, there is alsoprovided a moving picture decoding device. This device is a movingpicture decoding device that decodes a bitstream in which a movingpicture is coded using motion compensation in units of blocks acquiredby dividing each picture of the moving picture. The moving picturedecoding device includes: a decoding unit (202) configured to decodeinformation representing a motion vector predictor to be selectedtogether with a motion vector difference; a motion vector predictorcandidate generating unit (221, 222) configured to derive a plurality ofmotion vector predictor candidates by making a prediction based on amotion vector of one of decoded blocks that are neighboring to adecoding target block in space or time and construct a motion vectorpredictor candidate list; a motion vector predictor redundant candidateremoving unit (223) configured to remove the motion vector predictorcandidates having a same motion vector value among the motion vectorpredictor candidates predicted based on a decoded block that isneighboring in space from the motion vector predictor candidate listwith one being excluded; a motion vector predictor selecting unit (225)configured to select a motion vector predictor from the motion vectorpredictor candidate list based on information representing the decodedmotion vector predictor to be selected; and a motion vector calculatingunit (226) configured to calculate a motion vector used for motioncompensation by adding the selected motion vector predictor and themotion vector difference together.

According to another aspect of the present invention, there is provideda moving picture decoding method. This method is a moving picturedecoding method for decoding a bitstream in which a moving picture iscoded using motion compensation in units of blocks acquired by dividingeach picture of the moving picture. The moving picture decoding methodincludes: decoding information representing a motion vector predictor tobe selected together with a motion vector difference; deriving aplurality of motion vector predictor candidates by making a predictionbased on a motion vector of one of decoded blocks that are neighboringto a decoding target block in space or time and constructing a motionvector predictor candidate list; removing the motion vector predictorcandidates having identity among the motion vector predictor candidatespredicted based on a decoded block that is neighboring in space from themotion vector predictor candidate list with at least one being left;selecting a motion vector predictor from the motion vector predictorcandidate list based on information representing the decoded motionvector predictor to be selected; and calculating a motion vector usedfor motion compensation by adding the selected motion vector predictorand the motion vector difference together.

According to another aspect of the invention, there is also provided amoving picture decoding method. This method is a moving picture decodingmethod for decoding a bitstream in which a moving picture is coded usingmotion compensation in units of blocks acquired by dividing each pictureof the moving picture and includes: decoding information representing amotion vector predictor to be selected together with a motion vectordifference; deriving a plurality of motion vector predictor candidatesby making a prediction based on a motion vector of one of decoded blocksthat are neighboring to a decoding target block in space or time andconstructing a motion vector predictor candidate list; removing themotion vector predictor candidates having a same motion vector valueamong the motion vector predictor candidates predicted based on adecoded block that is neighboring in space from the motion vectorpredictor candidate list with one being excluded; selecting a motionvector predictor from the motion vector predictor candidate list basedon information representing the decoded motion vector predictor to beselected; and calculating a motion vector used for motion compensationby adding the selected motion vector predictor and the motion vectordifference together.

Furthermore, an arbitrary combination of the constituent elementsdescribed above and a conversion of the representation of the presentinvention among a method, a device, a system, a recording medium, acomputer program, and the like is valid as an aspect of the presentinvention.

According to the present invention, a plurality of motion vectorpredictors are calculated, and an optimal motion vector predictor isselected from among the plurality of motion vector predictors, andaccordingly, the generated coding amount of the motion vector differenceis reduced, whereby the coding efficiency is improved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram that illustrates the configuration of a movingpicture coding device executing a motion vector predicting methodaccording to an embodiment.

FIG. 2 is a block diagram that illustrates the configuration of a movingpicture decoding device executing a motion vector predicting methodaccording to an embodiment.

FIG. 3 is a diagram that illustrates tree blocks and coding blocks.

FIGS. 4A to 4D are diagrams that illustrate partition modes ofprediction blocks.

FIG. 5 is a diagram that illustrates a group of prediction blocks.

FIG. 6 is a diagram that illustrates a group of prediction blocks.

FIG. 7 is a diagram that illustrates a group of prediction blocks.

FIG. 8 is a diagram that illustrates a group of prediction blocks.

FIG. 9 is a diagram that illustrates a group of prediction blocks.

FIG. 10 is a diagram that illustrates the syntax of a bitstream at aslice level relating to a motion vector predicting method.

FIG. 11 is a diagram that illustrates the syntax of a bitstream at aprediction block level relating to a motion vector predicting method.

FIG. 12 is a block diagram that illustrates a detailed configuration ofa motion vector difference calculating unit illustrated in FIG. 1.

FIG. 13 is a block diagram that illustrates a detailed configuration ofa motion vector calculating unit illustrated in FIG. 2.

FIG. 14 is a flowchart that illustrates the sequence of the motionvector difference calculating process of the motion vector differencecalculating unit illustrated in FIG. 1.

FIG. 15 is a flowchart that illustrates the sequence of the motionvector calculating process of the motion vector calculating unitillustrated in FIG. 2.

FIG. 16 is a flowchart that illustrates the sequence of the process ofderiving motion vector predictor candidates and constructing a motionvector predictor list.

FIG. 17 is a flowchart that illustrates the sequence of the process ofderiving motion vector predictor candidates according to a firstembodiment.

FIG. 18 is a flowchart that illustrates the sequence of the process ofderiving motion vector predictor candidates.

FIG. 19 is a flowchart that illustrates the sequence of the process ofderiving motion vector predictor candidates according to the firstembodiment.

FIG. 20 is a flowchart that illustrates the sequence of the process ofcalculating the scaling of a motion vector.

FIG. 21 is a flowchart that illustrates the sequence of the process ofcalculating the scaling of the motion vector through integer arithmetic.

FIG. 22 is a flowchart that illustrates the sequence of the process ofderiving a motion vector predictor on the decoding side according to asecond embodiment.

FIG. 23 is a diagram that illustrates a motion vector predictorselection pattern of a case where a motion vector predictor according tothe second embodiment is determined to be a spatial motion vectorpredictor candidate.

FIG. 24 is a flowchart that illustrates the sequence of the process ofderiving motion vector predictor candidates.

FIG. 25 is a flowchart that illustrates the sequence of the process ofderiving a picture of a different time.

FIG. 26 is a flowchart that illustrates the sequence of the process ofderiving a prediction block candidate of a picture of a different time.

FIG. 27 is a flowchart that illustrates the sequence of the process ofderiving motion vector predictor candidates.

FIG. 28 is a flowchart that illustrates the sequence of the process ofderiving motion vector predictor candidates.

FIG. 29 is a flowchart that illustrates the sequence of the process ofcalculating the scaling of a motion vector.

FIG. 30 is a flowchart that illustrates the sequence of the process ofcalculating the scaling of a motion vector through integer arithmetic.

FIG. 31 is a flowchart that illustrates the sequence of the process ofadding motion vector predictor candidates to a motion vector predictorcandidate list.

FIG. 32 is a flowchart that illustrates the sequence of the process ofremoving redundant motion vector predictor candidates from a motionvector predictor candidate list.

FIG. 33 is a flowchart that illustrates the sequence of the process oflimiting the number of motion vector predictor candidates.

FIGS. 34A and 34B are diagrams that illustrate a conventional method ofcalculating a motion vector predictor.

DETAILED DESCRIPTION OF THE INVENTION

This embodiment relates to coding of a moving picture, and, in order toimprove the coding efficiency, particularly, in moving picture coding inwhich a picture is partitioned into rectangular blocks having anarbitrary size and an arbitrary shape, and motion compensation isperformed in units of blocks between pictures, a plurality of motionvector predictors are calculated based on motion vectors of codedneighboring blocks, and a differential vector between the motion vectorof a coding target block and a selected motion vector predictor iscalculated and is coded so as to reduce the coding amount.Alternatively, by using the coding information of coded neighboringblocks, the coding information of the coding target block is estimated,whereby the coding amount is reduced. In the case of decoding a movingpicture, a plurality of motion vector predictors are calculated based onmotion vectors of decoded neighboring blocks, and the motion vector ofthe decoding target block is calculated based on the differential vectordecoded from the bitstream and a selected motion vector predictor and isdecoded. In addition, by using the coding information of decodedneighboring blocks, the coding information of the decoding target blockis estimated.

First, technologies and technical terms used in this embodiment will bedefined.

(Tree Block and Coding Block)

In the embodiment, as illustrated in FIG. 3, the inside of a picture isequally partitioned in units of squares having an arbitrary same size.This unit is defined as a tree block and is configured as a basic unitof address management for specifying a coding/decoding target block (acoding target block in a coding process or a decoding target block in adecoding process; hereinafter, it will be used in this meaning, unlessotherwise noted) within a picture. Except for the case of monochrome,the tree block is configured by one luminance signal and two colordifference signals. The size of the tree block may be freely set to asize of a power of 2 in accordance with the picture size or a textureincluded inside the picture. In order to optimize the coding process inaccordance with a texture included in a picture of the tree block, thetree block may be configured as blocks having a small size byhierarchically partitioning the luminance signal and the colordifference signal into four parts (into respective two parts verticallyand horizontally) as is necessary. Each of these blocks is defined as acoding block and serves as a basic unit of the process at the time ofperforming the coding process and the decoding process. Except for thecase of monochrome, the coding block is also configured by one luminancesignal and two color difference signals. The maximal size of the codingblock is the same as the size of the tree block. A coding block of whichthe size is the minimal size of the coding block is called a minimalcoding block and may be freely set in the size of a power of 2.

In the case illustrated in FIG. 3, coding block A is configured as onecoding block without partitioning the tree block. Coding block B is acoding block that is formed by partitioning the tree block into fourparts. Coding block C is a coding block that is formed by furtherpartitioning a block, which is acquired by partitioning the tree blockinto four parts, into four parts. Coding block D is a coding block thatis formed by further hierarchically partitioning a block, which isacquired by partitioning the tree block into four parts, into four partstwice and is a coding block of the minimal size.

(Prediction Mode)

In units of coding blocks, switching is performed between an intraprediction MODE_INTRA in which a prediction is made based on neighboringpicture signals that have been coded/decoded within the picture of acoding target block and an inter prediction MODE_INTER in which aprediction is made based on coded/decoded picture signals of a picturedifferent from the picture of the coding target block. A mode fordiscriminating between the intra prediction MODE_INTRA and the interprediction MODE_INTER is defined as a prediction mode PredMode. Theprediction mode PredMode has the value of the intra predictionMODE_INTRA or the inter prediction MODE_INTER and can selecttherebetween for coding.

(Partition Mode, Prediction Block, and Prediction Unit)

In a case where the intra prediction MODE_INTRA and the inter predictionMODE_INTER are made with the inside of a picture being partitioned intoblocks, in order to make the unit, in which switching between the intraprediction and the inter prediction is performed, smaller, predictionsare made with the coding block being partitioned into parts as isnecessary. A mode for identifying a method of partitioning the luminancesignal and the color difference signal of this coding block is definedas a partition mode (PartMode). In addition, the partitioned blocks aredefined as prediction blocks. As illustrated in FIGS. 4A to 4D, fourkinds of partition modes (PartMode) are defined in accordance with themethod of partitioning the luminance signal of the coding block. Apartition mode (PartMode) in which the luminance signal of the codingblock is not partitioned so as to be regarded as one prediction block(FIG. 4A) is defined as a 2N×2N partition (PART_2N×2N), a partition mode(PartMode) in which the luminance signal of the coding block ispartitioned into two parts in the horizontal direction so as to form twoprediction blocks (FIG. 4B) is defined as a 2N×N partition (PART_2N×N),a partition mode (PartMode) in which the luminance signal of the codingblock is partitioned in the vertical direction, and the coding block isformed as two prediction blocks (FIG. 4C) is defined as an N×2Npartition (PART_N×2N), and a partition mode (PartMode) in which theluminance signal of the coding block is partitioned through equalpartitioning in the horizontal and vertical directions so as to formfour prediction blocks (FIG. 4D) is defined as an N×N partition(PART_N×N). In addition, the color difference signal is partitioned atthe same vertical and horizontal partition ratios of the luminancesignal for each partition mode (PartMode).

Inside the coding block, in order to specify respective predictionblocks, numbers starting from zero are assigned to prediction blockspresent inside the coding block in the order of coding. These numbersare defined as partition indexes PartIdx. Each number represented insideeach prediction block of the coding blocks illustrated in FIGS. 4A to 4Drepresents the partition index PartIdx of the prediction block. In the2N×N partition PART_2N×N illustrated in FIG. 4B, the partition indexPartIdx of the upper prediction block is set to “0”, and the partitionindex PartIdx of the lower prediction block is set to “1”. In the N×2Npartition PART_N×2N illustrated in FIG. 4C, the partition index PartIdxof the left prediction block is set to “0”, and the partition indexPartIdx of the right prediction block is set to “1”. In the N×Npartition PART_N×N illustrated in FIG. 4D, the partition index PartIdxof the upper left prediction block is set to “0”, the partition indexPartIdx of the upper right prediction block is set to “1”, the partitionindex PartIdx of the lower left prediction block is set to “2”, and thepartition index PartIdx of the lower right prediction block is set to“3”.

In a case where the prediction mode PredMode is the inter predictionMODE_INTER, in a coding block other than the coding block D that is theminimal coding block, the 2N×2N partition PART_2N×2N, the 2N×N partitionPART_2N×N, and the N×2N partition PART_N×2N are defined as the partitionmodes PartMode, and, only in the coding block D that is the minimalcoding block, in addition to 2N×2N partition PART_2N×2N, the 2N×Npartition PART_2N×N, and the N×2N partition PART_N×2N, the N×N partitionPART_N×N is defined as the partition modes PartMode. The reason for notdefining the N×N partition PART_N×N in a block other than the minimalcoding block is that the coding block can be divided into four parts soas to represent small coding blocks in a block other than the minimalcoding block.

(Position of Tree Block, Coding Block, Prediction Block, and ConversionBlock)

As the position of each of blocks including a tree block, a codingblock, a prediction block, and a conversion block according to thisembodiment, the position of a pixel of an upper leftmost luminancesignal included in the area of each block is represented astwo-dimensional coordinates of (x, y) with the position of the pixel ofthe upper leftmost luminance signal of the screen of the luminancesignals being set as the origin (0, 0). As the directions of thecoordinate axes, the rightward direction in the horizontal direction,and the downward direction in the vertical direction are defined aspositive directions, and the unit is one pixel unit of the luminancesignal. Not only in a case where the color difference format is 4:4:4 inwhich the picture size (the number of pixels) is the same between theluminance signal and the color difference signal, but also in a casewhere the color difference format is 4:2:0 or 4:2:2 in which the picturesize (the number of pixels) is different between the luminance signaland the color difference signal, the position of each block of the colordifference signal is represented as the coordinates of a pixel of theluminance signal included in the area of the block, and the unit is onepixel of the luminance signal. By configuring as such, not only theposition of each block of the color difference signal can be specifiedbut also the positional relation between the block of the luminancesignal and the block of the color difference signal is clear bycomparing the values of the coordinates.

(Group of Prediction Blocks)

A group configured by a plurality of prediction blocks is defined as aprediction block group. FIGS. 5, 6, 7, and 8 are diagrams thatillustrate prediction block groups neighboring to a prediction blockthat is the coding/decoding target within a picture of the predictionblock that is the coding/decoding target. FIG. 9 is a diagram thatillustrates a prediction block group, which has already beencoded/decoded, present at the same position as that of the predictionblock that is the coding/decoding target or a position neighboringthereto in a coded/decoded picture of a time different from the time ofthe prediction block that is the coding/decoding target. The predictionblock group will be described with reference to FIGS. 5, 6, 7, 8, and 9.

As illustrated in FIG. 5, a first prediction block group configured by aprediction block A1 that is neighboring to the left side of a predictionblock, which is the coding/decoding target, within a picture of theprediction block that is the coding/decoding target and a predictionblock A0 that is neighboring to the lower left vertex of the predictionblock that is the coding/decoding target is defined as a predictionblock group neighboring to the left side.

In addition, as illustrated in FIG. 6, even in a case where the size ofthe prediction block neighboring to the left side of the predictionblock that is the coding/decoding target is larger than that of theprediction block that is the coding/decoding target, according to theabove-described condition, in a case where a prediction block Aneighboring to the left side is neighboring to the left side of theprediction block that is the coding/decoding target, the predictionblock A is set as the prediction block A1, and, in a case where theprediction block A is neighboring to the lower left vertex of theprediction block that is the coding/decoding target, the predictionblock A is set as the prediction block A0. In the example illustrated inFIG. 6, the prediction blocks A0 and A1 are the same.

Furthermore, as illustrated in FIG. 7, in a case where a plurality ofprediction blocks neighboring to the left side of the prediction blockthat is the coding/decoding target are present, and the size of each ofthe plurality of prediction blocks is smaller than that of theprediction block that is the coding/decoding target, in this embodiment,only a lowermost prediction block A10 out of the prediction blocksneighboring to the left side is set as the prediction block A1neighboring to the left side.

Substantially similarly to the definition of the prediction block groupneighboring to the left side, a second prediction block group configuredby a prediction block B1 neighboring to the upper side of the predictionblock that is the coding/decoding target within the picture of theprediction block that is the coding/decoding target, a prediction blockB0 neighboring to the upper right vertex of the prediction block that isthe coding/decoding target, and a prediction block B2 neighboring to theupper left vertex of the prediction block that is the coding/decodingtarget is defined as a prediction block group neighboring to the upperside.

In addition, as illustrated in FIG. 8, even in a case where the size ofthe prediction block neighboring to the upper side of the predictionblock that is the coding/decoding target is larger than that of theprediction block that is the coding/decoding target, according to theabove-described condition, in a case where a prediction block Bneighboring to the upper side is neighboring to the upper side of theprediction block that is the coding/decoding target, the predictionblock B is set as the prediction block B1, in a case where theprediction block B is neighboring to the upper right vertex of theprediction block that is the coding/decoding target, the predictionblock B is set as the prediction block B0, and, in a case where theprediction block B is neighboring to the upper left vertex of theprediction block that is the coding/decoding target, the predictionblock B is set as the prediction block B2. In the example illustrated inFIG. 8, the prediction blocks B0, B1, and B2 are the same.

Furthermore, as illustrated in FIG. 7, in a case where a plurality ofprediction blocks neighboring to the upper side of the prediction blockthat is the coding/decoding target are present, and the size of each ofthe plurality of prediction blocks is smaller than that of theprediction block that is the coding/decoding target, in this embodiment,only a rightmost prediction block B10 out of the prediction blocksneighboring to the upper side is set as the prediction block B1neighboring to the upper side.

A difference from the prediction block group neighboring to the leftside is that the prediction block B2 neighboring to the upper leftvertex of the prediction block that is the coding/decoding target isincluded in the prediction block group neighboring to the upper side.While the upper left prediction block B2 may be included in anyprediction block group, here, the upper left prediction block B2 isincluded in the prediction block group neighboring to the upper side.Accordingly, the number of prediction blocks of the prediction blockgroup neighboring to the upper side is more than that of predictionblocks of the prediction block group neighboring to the left side.

As illustrated in FIG. 9, in a coded/decoded picture of a time that isdifferent from the time of the prediction block that is thecoding/decoding target, a third prediction block group configured byprediction block groups T0 and T1, which have already beencoded/decoded, present at the same position as the position of theprediction block that is the coding/decoding target or at a positionneighboring thereto is defined as a prediction block group of adifferent time.

(Inter Prediction Mode and Reference List)

In an embodiment of the present invention, in an inter prediction makinga prediction based on a picture signal of a coded/decoded picture, aplurality of decoded pictures may be used as reference pictures. Inorder to specify a reference picture selected from among the pluralityof reference pictures, an index is attached to each prediction block. Ina B slice, an inter prediction can be made by selecting arbitrary tworeference pictures for each prediction block, and there are an L0prediction Pred_L0, an L1 prediction Pred_L1, and a bi-predictionPred_BI as the modes of the inter prediction. The reference pictures aremanaged by L0 (reference list 0) and L1 (reference list 1) of a liststructure, and, by designating a reference index of L0 or/and L1, areference picture can be specified. The L0 prediction Pred_L0 is aninter prediction referring to a reference picture managed by thereference list L0, the L1 prediction Pred_L1 is an inter predictionreferring to a reference picture managed by the reference list L1, andthe bi-prediction Pred_BI is an inter prediction referring to onereference picture managed by each of the reference lists L0 and L1 byperforming both the L0 and L1 predictions. In an inter prediction of a Pslice, only the L0 prediction can be used. In addition, in an interprediction of a B slice, the L0 prediction, the L1 prediction, and thebi-prediction Pred_BI that averages or weights the L0 and L1 predictionscan be used. In the processes described below, it is assumed that theprocess is performed for each of the reference lists L0 and L1 for aconstant or a variable to which a suffix LX (here, X is 0 or 1)according to the output is attached.

(POC)

A POC is a variable that is associated with a picture to be coded, and avalue increased each time by one in the sequence of output/display of apicture is set thereto. Based on the values of the POCs, the identity ofpictures and the order of pictures in the sequence of output/display canbe determined, and a distance between pictures can be derived. Forexample, in a case where the POCs of two pictures have the same value,the pictures can be determined to be the same. On the other hand, in acase where the POCs of two pictures have mutually different values, apicture having a smaller value of the POC can be determined to be apicture that is output/displayed first in time, and a difference betweenthe POCs of two pictures represents a distance between the pictures inthe direction of the time axis.

Embodiment 1

Embodiment 1 of the present invention will be described with referenceto the drawings. FIG. 1 is a block diagram that illustrates theconfiguration of a moving picture coding device according to theembodiment of the present invention. The moving picture coding deviceaccording to the embodiment includes: a picture memory 101; a motionvector detecting unit 102; a motion vector difference calculating unit103; an inter prediction information estimating unit 104; a motioncompensation predicting unit 105; a prediction method determining unit106; a residual signal generating unit 107; an orthogonal transform andquantization unit 108; a first bitstream generating unit 109; a secondbitstream generating unit 110; a multiplexing unit 111; an inversequantization and inverse orthogonal transform unit 112; a decodedpicture signal superimposing unit 113; a coding information storingmemory 114; and a decoded picture memory 115.

The picture memory 101 temporarily stores a picture signal of a codingtarget picture that is supplied in order of display time. The picturememory 101 supplies the stored picture signal of the coding targetpicture to the motion vector detecting unit 102, the prediction methoddetermining unit 106, and the residual signal generating unit 107 inunits of predetermined pixel blocks. At that time, the picture signalsof pictures stored in order of display time are rearranged in order ofcoding and are output from the picture memory 101 in units of pixelblocks.

The motion vector detecting unit 102 detects the size of each predictionblock and the motion vector of each prediction mode in units ofprediction blocks through block matching or the like between a picturesignal supplied from the picture memory 101 and a reference picturesupplied from the decoded picture memory 115 and supplies the detectedmotion vector to the motion compensation predicting unit 105, the motionvector difference calculating unit 103, and the prediction methoddetermining unit 106.

The motion vector difference calculating unit 103, by using codinginformation of a picture signal, which has already been coded, stored inthe coding information storing memory 114, constructs a motion vectorpredictor list to be described later by calculating a plurality ofmotion vector predictor candidates, selects an optimal motion vectorpredictor from among the plurality of motion vector predictor candidatesadded to the generated motion vector predictor list, calculates a motionvector difference based on the motion vector detected by the motionvector detecting unit 102 and the motion vector predictor, and suppliesthe calculated motion vector difference to the prediction methoddetermining unit 106. In addition, a motion vector predictor index usedfor specifying a selected motion vector predictor from among the motionvector predictor candidates added to the generated motion vectorpredictor list is supplied to the prediction method determining unit106. The configuration and the operation of the motion vector differencecalculating unit 103 will be described in detail later.

The inter prediction information estimating unit 104 estimates interprediction information of a merge mode. Here, the merge mode is a modein which inter prediction information of a neighboring inter-predictedprediction block that has been coded or an inter-predicted predictionblock of another picture is used instead of coding inter predictioninformation such as the prediction mode of the prediction block, thereference index (information used for specifying a reference pictureused for motion compensation from among a plurality of referencepictures added to the reference list), the motion vector, and the like.By using the coding information of a prediction block, which has alreadybeen coded, stored in the coding information storing memory 114, aplurality of merge candidates (candidates for inter predictioninformation) is calculated so as to construct a merge candidate list, anoptimal merge candidate is selected from the plurality of mergecandidates added to the constructed merge candidate list, the interprediction information such as the prediction mode, the reference index,the motion vector, and the like of the selected merge candidate issupplied to the motion compensation predicting unit 105, and a mergeindex specifying the selected merge candidate is supplied to theprediction method determining unit 106.

The motion compensation predicting unit 105 generates a predictedpicture signal by making motion compensation based on the referencepicture by using the motion vector detected by the motion vectordetecting unit 102 and the inter prediction information estimating unit104 and supplies the generated predicted picture signal to theprediction method determining unit 106. In addition, in the L0prediction and the L1 prediction, a one-way prediction is made. In thecase of the bi-prediction Pred_BI, a bi-directional prediction is made,inter-predicted signals of the L0 and L1 predictions are adaptablymultiplied by weighting coefficients, and resultant signals aresuperimposed with an offset value being added thereto, whereby a finalpredicted picture signal is generated.

The prediction method determining unit 106, by evaluating the codingamounts of motion vector differences according to a plurality ofprediction methods, the amount of distortion between a predicted picturesignal and a picture signal, and the like, determines a prediction modePredMode determining the inter prediction PRED_INTER or the intraprediction PRED_INTRA and the partition mode PartMode in units of codingblocks, determines a prediction method such as a merge mode or anon-merge mode in units of prediction blocks in the inter predictionPRED_INTER, determines the merge index in the case of the merge mode oran inter prediction flag, a motion vector predictor index, the referenceindexes of L0 and L1, a motion vector difference, and the like in a casewhere the mode is not the merge mode, and supplies coding informationaccording to the determinations to the first bitstream generating unit109.

In addition, the prediction method determining unit 106 storesinformation representing the determined prediction method and codinginformation including a motion vector and the like according to thedetermined prediction method in the coding information storing memory114. Here, the stored coding information includes a prediction modePredMode, a partition mode PartMode, flags predFlagL0 and predFlagL1respectively representing whether to use the L0 prediction and whetherto use the L1 prediction, reference indexes refIdxL0 and refIdxL1 of thereference lists L0 and L1, motion vectors mvL0 and mvL1 of the referencelists L0 and L1, and the like. Here, in a case where the prediction modePredMode is the intra prediction MODE_INTRA, both the flag predFlagL0representing whether to use the L0 prediction and the flag predFlagL1representing whether to use the L1 prediction are “0”. On the otherhand, in a case where the prediction mode PredMode is the interprediction MODE_INTER, and the inter prediction mode is the L0prediction Pred_L0, the flag predFlagL0 representing whether to use theL0 prediction is “1”, and the flag predFlagL1 representing whether touse the L1 prediction is “0”. In addition, in a case where the interprediction mode is the L1 prediction Pred_L1, the flag predFlagL0representing whether to use the L0 prediction is “0”, and the flagpredFlagL1 representing whether to use the L1 prediction is “1”. In acase where the inter prediction mode is the bi-prediction Pred_BI, boththe flag predFlagL0 representing whether to use the L0 prediction andthe flag predFlagL1 representing whether to use the L1 prediction are“1”. The prediction method determining unit 106 supplies a predictedpicture signal according to the determined prediction mode to theresidual signal generating unit 107 and the decoded picture signalsuperimposing unit 113.

The residual signal generating unit 107 generates a residual signal byperforming subtraction between a picture signal to be coded and apredicted picture signal and supplies the generated residual signal tothe orthogonal transform and quantization unit 108.

The orthogonal transform and quantization unit 108 generates anorthogonally-transformed and quantized residual signal by performingorthogonal transform and quantization of the residual signal inaccordance with a quantization parameter and supplies the generatedorthogonally-transformed and quantized residual signal to the secondbitstream generating unit 110 and the inverse quantization and inverseorthogonal transform unit 112. In addition, the orthogonal transform andquantization unit 108 stores the quantization parameter in the codinginformation storing memory 114.

The first bitstream generating unit 109, in addition to the informationin units of sequences, pictures, slices, and coding blocks, codes thecoding information according to the prediction method determined by theprediction method determining unit 106 for each coding block and eachprediction block. More specifically, a first bitstream is generated byperforming entropy coding of the coding information such as informationrelating to a prediction mode PredMode for each coding block, apartition mode PartMode, in the case of the inter prediction PRED_INTER,a flag used for determining the merge mode or not, in the case of themerge mode, a merge index, in the case of a non-merge mode, an interprediction mode, a motion vector predictor index, a motion vectordifference, and the like in accordance with a regulated syntax rule tobe described later, and the generated first coding bitstream is suppliedto the multiplexing unit 111.

The second bitstream generating unit 110 generates a second bitstream byperforming entropy coding of the orthogonally-transformed and quantizedresidual signal in accordance with the regulated syntax rule andsupplies the generated second bitstream to the multiplexing unit 111.The multiplexing unit 111 multiplexes the first bitstream and the secondbitstream in accordance with a regulated syntax rule and outputs themultiplexed bit stream.

The inverse quantization and inverse orthogonal transform unit 112calculates a residual signal by performing inverse quantization and aninverse orthogonal transform of the orthogonally transformed andquantized residual signal supplied from the orthogonal transform andquantization unit 108 and supplies the residual signal to the decodedpicture signal superimposing unit 113.

The decoded picture signal superimposing unit 113 generates a decodedpicture by superimposing a predicted picture signal according to thedetermination made by the prediction method determining unit 106 and theresidual signal that is inversely quantized and inverselyorthogonally-transformed by the inverse quantization and inverseorthogonal transform unit 112 together and stores the generated decodedpicture in the decoded picture memory 115. In addition, there is also acase where a filtering process decreasing a distortion such as a blockdistortion according to coding is performed for the decoded picture, andthe processed decoded picture is stored in the decoded picture memory115.

FIG. 2 is a block diagram that illustrates the configuration of a movingpicture decoding device according to an embodiment of the presentinvention that corresponds to the moving picture coding deviceillustrated in FIG. 1. The moving picture decoding device according tothe embodiment includes: a separation unit 201; a first bitstreamdecoding unit 202; a second bitstream decoding unit 203; a motion vectorcalculating unit 204; an inter prediction information estimating unit205; motion compensation unit 206; an inverse quantization and inverseorthogonal transform unit 207; a decoded picture signal superimposingunit 208; a coding information storing memory 209, and a decoded picturememory 210.

Since the decoding process of the moving picture decoding deviceillustrated in FIG. 2 corresponds to the coding process provided insidethe moving picture coding device illustrated in FIG. 1, theconfigurations of the motion compensation unit 206, the inversequantization and inverse orthogonal transform unit 207, the decodedpicture signal superimposing unit 208, the coding information storingmemory 209, and the decoded picture memory 210 illustrated in FIG. 2have functions that respectively correspond to the configurations of themotion compensation predicting unit 105, the inverse quantization andinverse orthogonal transform unit 112, the decoded picture signalsuperimposing unit 113, the coding information storing memory 114, andthe decoded picture memory 115 of the moving picture coding deviceillustrated in FIG. 1.

The bitstream supplied to the separation unit 201 is separated inaccordance with a regulated syntax rule, and separated bitstreams aresupplied to the first bit stream decoding unit 202 and the secondbitstream decoding unit 203.

The first bitstream decoding unit 202 decodes the supplied bitstreams,thereby acquiring information in units of sequences, pictures, slices,and coding blocks and the coding information in units of predictionblocks. More specifically, coding information such as informationrelating to a prediction mode PredMode used for determining the interprediction PRED_INTER or the intra prediction PRED_INTRA in units ofcoding blocks, a partition mode PartMode, in the case of the interprediction PRED_INTER, a flag used for determining the merge mode ornot, in the case of the merge mode, a merge index, in the case of anon-merge mode, an inter prediction mode, a motion vector predictorindex, a motion vector difference, and the like is decoded in accordancewith a regulated syntax rule to be described later, and the codinginformation is supplied to the motion vector calculating unit 204 or theinter prediction information estimating unit 205.

The second bitstream decoding unit 203 calculates an orthogonallytransformed and quantized residual signal by decoding the suppliedbitstream and supplies the orthogonally transformed and quantizedresidual signal to the inverse quantization and inverse orthogonaltransform unit 207.

In a case where the prediction block that is the decoding target is notthe merge mode, the motion vector calculating unit 204, by using thecoding information of a picture signal, which has already been decoded,stored in the coding information storing memory 209, calculates aplurality of motion vector predictor candidates so as to generate amotion vector predictor list to be described later, selects a motionvector predictor according to a motion vector predictor index that isdecoded and supplied by the first bitstream decoding unit 202 from amongthe plurality of motion vector predictor candidates added to theconstructed motion vector predictor list, calculates a motion vectorbased on the differential vector decoded by the first bitstream decodingunit 202 and the selected motion vector predictor, supplies the motionvector to the motion compensation unit 206 together with the othercoding information, and stores the motion vector in the codinginformation storing memory 209. The coding information of the predictionblock that is supplied and stored here includes the prediction modePredMode, the partition mode PartMode, the flags predFlagL0 andpredFlagL1 respectively representing whether to use the L0 predictionand whether to use the L1 prediction, the reference indexes refIdxL0 andrefIdxL1 of the reference lists L0 and L1, the motion vectors mvL0 andmvL1 of the reference lists L0 and L1, and the like. Here, in a casewhere the prediction mode PredMode is the intra prediction MODE_INTRA,both the flag predFlagL0 representing whether to use the L0 predictionand the flag predFlagL1 representing whether to use the L1 predictionare “0”. On the other hand, in a case where the prediction mode PredModeis the inter prediction MODE_INTER, and the inter prediction mode is theL0 prediction Pred_L0, the flag predFlagL0 representing whether to usethe L0 prediction is “1”, and the flag predFlagL1 representing whetherto use the L1 prediction is “0”. In addition, in a case where the interprediction mode is the L1 prediction Pred_L1, the flag predFlagL0representing whether to use the L0 prediction is “0”, and the flagpredFlagL1 representing whether to use the L1 prediction is “1”. In acase where the inter prediction mode is the bi-prediction Pred_BI, boththe flag predFlagL0 representing whether to use the L0 prediction andthe flag predFlagL1 representing whether to use the L1 prediction are“1”. The configuration and the operation of the motion vectorcalculating unit 204 will be described in detail later.

When the prediction block that is the decoding target is in the mergemode, the inter prediction information estimating unit 205 estimates theinter prediction information of the merge mode. By using the codinginformation of the prediction block, which has already been decoded,stored in the coding information storing memory 114, a plurality ofmerge candidates are calculated so as to construct a merge candidatelist, selects a merge candidate corresponding to the merge index that isdecoded and supplied by the first bitstream decoding unit 202 from amongthe plurality of merge candidates added to the constructed mergecandidate list, the inter prediction information such as the predictionmode PredMode of the selected merge candidate, the partition modePartMode, the flags respectively representing whether to use the L0prediction and whether to use the L1 prediction, and the referenceindexes of the reference lists L0 and L1, and the motion vectors of thereference lists L0 and L1, and the like is supplied to the motioncompensation unit 206 and is stored in the coding information storingmemory 209.

The motion compensation unit 206 generates a predicted picture signal bymaking motion compensation based on the reference picture by using themotion vector calculated by the motion vector calculating unit 204 andsupplies the generated predicted picture signal to the decoded picturesignal superimposing unit 208. In addition, in the case of thebi-prediction Pred_BI, two motion-compensated predicted picture signalsof the L0 and L1 predictions are adaptively multiplied by weightingcoefficients and are superimposed together, whereby a final predictedpicture signal is generated.

The inverse quantization and inverse orthogonal transform unit 207performs an inverse orthogonal transform and inverse quantization of theorthogonally transformed and quantized residual signal decoded by thefirst bitstream decoding unit 202, thereby acquiring an inverselyorthogonally transformed and inversely quantized residual signal.

The decoded picture signal superimposing unit 208 decodes a decodingpicture signal by superimposing the predicted picture signal that isacquired by the motion compensation unit 206 through motion compensationand the residual signal that is inversely orthogonally transformed andinversely quantized by the inverse quantization and inverse orthogonaltransform unit 207 together and stores the decoding picture signal inthe decoded picture memory 210. When the decoding picture signal isstored in the decoded picture memory 210, there is also a case where afiltering process decreasing a distortion such as a block distortionaccording to coding is performed for the decoded picture, and theprocessed decoded picture is stored in the decoded picture memory 210.

(Syntax)

Next, the syntax that is a rule common to the coding process and thedecoding process of a bitstream of a moving picture that is coded by amoving picture coding device including the motion vector predictingmethod according to this embodiment and is decoded by a decoding devicewill be described.

FIG. 10 illustrates the structure of a first syntax described in a sliceheader in units of slices of a bitstream generated in accordance withthis embodiment. Here, only syntax elements relating to this embodimentare illustrated. In a case where the slice type is B, a flagcollocated_from_10_flag that represents one of the reference lists L0and L1 in which a picture colPic of a different time used when a motionvector predictor candidate of the time direction or a merge candidate iscalculated is defined is arranged. The flag collocated_from_10_flag willbe described in detail later.

In addition, the above-described syntax elements may be arranged in apicture parameter set that describes the syntax elements set in units ofpictures.

FIG. 11 illustrates the pattern of the syntax described in units ofprediction blocks. In a case where the value of the prediction modePredMode of a prediction block represents the inter predictionMODE_INTER, a flag merge_flag[x0][y0] that represents a merge mode ornot is arranged. Here, x0 and y0 are indexes representing the positionof an upper left pixel of the prediction block within the picture of theluminance signal, and the flag merge_flag[x0][y0] is a flag thatrepresents whether or not the mode is a merge mode of the predictionblock positioned at (x0, y0) within the picture.

Next, in a case where the flag merge_flag[x0][y0] is “1”, it representsthe merge mode, and a syntax element merge_idx[x0][y0] of an index of amerge list that is a list of merge candidates to be referred to isarranged. Here, x0 and y0 are indexes that represent the position of anupper left pixel of the prediction block within the picture, and thesyntax element merge_idx[x0][y0] is a merge index of the predictionblock positioned at (x0, y0) within the picture.

On the other hand, in a case where the flag merge_flag[x0][y0] is “0”,it represents that the mode is not the merge mode, and, in a case wherethe slice type is B, a syntax element inter_pred_flag[x0][y0] specifyingthe inter prediction mode is arranged, and the L0 prediction Pred_L0,the L1 prediction Pred_L1, or the bi-prediction Pred_BI is identifiedusing this syntax element. In accordance with the inter prediction mode,for each of the reference lists L0 and L1, a syntax elementref_idx_l0[x0][y0] or ref_idx_l1[x0][y0] of the reference index used forspecifying the reference picture and a syntax element mvd_l0[x0][y0][j]or mvd_l1[x0][y0][j] of a motion vector difference that is a differencebetween the motion vector of the prediction block acquired in the motionvector detecting process and the motion vector predictor are arranged.Here, x0 and y0 are indexes that represent the position of an upper leftpixel of the prediction block within the picture, ref_idx_l0[x0][y0] andmvd_l0[x0][y0][j] are the reference index L0 and a motion vectordifference of the prediction block positioned at (x0, y0) within thepicture, and ref_idx_l1[x0][y0] and mvd_l1[x0][y0][j] are the referenceindex L1 and a motion vector difference of the prediction blockpositioned at (x0, y0) within the picture. In addition, j represents acomponent of the motion vector difference. Thus, an x component isrepresented in a case where j is “0”, and a y component is representedin a case where j is “1”. Next, syntax elements mvp_idx_l0[x0][y0] andmvp_idx_l1[x0][y0] of the indexes of the motion vector predictor listthat is a list of motion vector predictors to be referred to arearranged. Here, x0 and y0 are indexes that represent the position of anupper left pixel of the prediction block within the picture, andmvp_idx_l0[x0][y0] and mvp_idx_l1[x0][y0] are motion vector predictorindexes of the reference indexes L0 and L1 of the prediction blockpositioned at (x0, y0) within the picture.

The motion vector predicting method according to an embodiment is usedin the motion vector difference calculating unit 103 of the movingpicture coding device illustrated in FIG. 1 and the motion vectorcalculating unit 204 of the moving picture decoding device illustratedin FIG. 2.

The motion vector predicting method according to the embodiment will bedescribed with reference to the figures. The motion vector predictingmethod is used in any of the coding process and the decoding process inunits of prediction blocks that configure a coding block. In a casewhere the prediction mode of the prediction block is the interprediction MODE_INTER, and the mode is not the merge mode, in the caseof coding, the motion vector predicting method is used when a motionvector predictor is derived by using a coded motion vector that is usedwhen a motion vector difference coded from a motion vector that is thecoding target. In addition, in the case of decoding, the motion vectorpredicting method is used when a motion vector predictor is derived byusing a decoded motion vector used when a motion vector of the decodingtarget is calculated.

(Prediction of Motion Vector in Coding)

In the moving picture coding device that codes a bitstream of a movingpicture based on the above-described syntax, the operation of the motionvector predicting method according to the embodiment will be described.In a case where motion compensation is made in units of slices, in otherwords, in a case where the slice type is a P slice (one-directionalprediction slice) or a B slice (bi-directional prediction slice), andthe prediction mode of the prediction block within the slice is theinter prediction MODE_INTER, the motion vector predicting method isapplied to a prediction block used for coding or decoding a motionvector difference that is not in the merge mode.

FIG. 12 is a diagram that illustrates a detailed configuration of themotion vector difference calculating unit 103 of the moving picturecoding device illustrated in FIG. 1. A portion of FIG. 12 that issurrounded by a thick frame line illustrates the motion vectordifference calculating unit 103.

In addition, a portion that is surrounded by a thick dotted line on theinside thereof illustrates operating units according to the motionvector predicting method to be described later and is similarlyinstalled to a moving picture decoding device corresponding to themoving picture coding device according to the embodiment, so that thesame determination result having no contradiction between the codingprocess and the decoding process is acquired. Hereinafter, the motionvector predicting method in the coding process will be described withreference to this drawing.

The motion vector difference calculating unit 103 includes: a motionvector predictor candidate generating unit 121; a motion vectorpredictor candidate adding unit 122; a motion vector predictor redundantcandidate removing unit 123; a motion vector predictor candidate numberlimiting unit 124; a motion vector predictor candidate coding amountcalculating unit 125; a motion vector predictor selecting unit 126; anda motion vector subtraction unit 127.

In a motion vector difference calculating process performed by themotion vector difference calculating unit 103, motion vector differencesof motion vectors used in an inter prediction method selected for thecoding target block are calculated for the reference lists L0 and L1.More specifically, in a case where the prediction mode PredMode of thecoding target block is the inter prediction MODE_INTER, and the interprediction mode of the coding target block is the L0 prediction Pred_L0,a motion vector predictor list mvpListL0 of the reference list L0 iscalculated, a motion vector predictor mvpL0 is selected, and a motionvector difference mvdL0 of the motion vector of the reference list L0 iscalculated. On the other hand, in a case where the inter prediction modePred_L1 of the coding target block is the L1 prediction, a motion vectorpredictor list mvpListL1 of the reference list L1 is calculated, amotion vector predictor mvpL1 is selected, and a motion vectordifference mvdL1 of the motion vector of the reference list L1 iscalculated. In addition, in a case where the inter prediction mode ofthe coding target block is the bi-prediction Pred_BI, both the L0prediction and the L1 prediction are performed, whereby a motion vectorpredictor list mvpListL0 of the reference list L0 is calculated, amotion vector predictor mvpL0 of the reference list L0 is selected, anda motion vector difference mvdL0 of the motion vector mvL0 of thereference list L0 is calculated, and a motion vector predictor listmvpListL1 of the reference list L1 is calculated, a motion vectorpredictor mvpL1 of the reference list L1 is calculated, and a motionvector difference mvdL1 of the motion vector mvL1 of the reference listL1 is calculated.

While the motion vector difference calculating process is performed foreach of the reference lists L0 and L1, the motion vector differencecalculating process is common to both the reference lists L0 and L1.Accordingly, in the following description, L0 and L1 will be denoted bycommon LX. In the motion vector difference calculating process of thereference list L0, X is “0”, and in the motion vector differencecalculating process of the reference list L1, X is “1”. In addition,during the motion vector difference calculating process of the referencelist LX, in a case where information of not the reference list LX butinformation of the other list is referred to, the other list will bedenoted by LY.

The motion vector predictor candidate generating unit 121, for each ofthe reference lists L0 and L1, from three prediction block groupsincluding: a prediction block group (a prediction block groupneighboring to the left side of the prediction block within the pictureof the prediction block that is the coding target; A0 and A1 illustratedin FIG. 5) neighboring to the left side; a prediction block group (aprediction block group neighboring to the upper side of the predictionblock within the picture of the prediction block that is the codingtarget; B0, B1, and B2 illustrated in FIG. 5) neighboring to the upperside; and a prediction block group of a different time (a predictionblock group, which has already been coded, present at the same positionas that of a prediction block that is the coding target or at a positionneighboring thereto in a picture of a time different from the time ofthe prediction block; T0 and T1 illustrated in FIG. 9), derives onemotion vector mvLXCol, mvLXA, and mvLXB for each prediction block group,sets the derived motion vectors as motion vector predictor candidates,and supplies the motion vector predictor candidates to the motion vectorpredictor candidate adding unit 122. Hereinafter, the motion vectormvLXCol will be referred to as a time motion vector predictor candidate,and the motion vectors mvLXA and mvLXB will be referred to as spatialmotion vector predictor candidates. When the motion vector predictorcandidates are calculated, the coding information such as the referenceindex and the POC of the prediction block that is the coding target, theprediction mode of a coded prediction block that is stored in the codinginformation storing memory 114, the reference index for each referencelist, the POC of the reference picture, the motion vector, and the likeis used.

The motion vector predictor candidates mvLXCol, mvLXA, and mvLXB may bederived by performing scaling in accordance with the relationshipbetween the POC of the coding target picture and the POC of thereference picture.

The motion vector predictor candidate generating unit 121, for eachprediction block group, in a predetermined order, makes a determinationof a condition to be described later for the prediction block withineach prediction block group, selects a motion vector of the predictionblock that satisfies the condition first, and sets the selected motionvectors as the motion vector predictor candidates mvLXCol, mvLXA, andmvLXB.

In order to calculate a motion vector predictor from a prediction blockgroup neighboring to the left side, in the order (the order of A0 and A1from A0 illustrated in FIG. 5) of the lower side to the upper side ofthe prediction block group neighboring to the left side, in order tocalculate a motion vector predictor from a prediction block groupneighboring to the upper side, in the order (the order of B0, B1, and B2from B0 illustrated in FIG. 5) of the right side to the left side of theprediction block group neighboring to the upper side, and in order tocalculate a motion vector predictor from a prediction block group of adifferent time, in the order of T0 and T1 from T0 illustrated in FIG. 9,a determination of the condition to be described later is made for eachprediction block, a motion vector of the prediction block satisfying thecondition first is selected, and the motion vector predictor candidatesare set as mvLXCol, mvLXA, and mvLXB.

In other words, in the left neighboring prediction block group, a lowestprediction block has the highest priority level, and the priority levelis assigned from the lower side to the upper side. In addition, in theupper neighboring prediction block group, a rightmost prediction blockhas the highest priority level, and the priority level is assigned fromthe right side to the left side. In the prediction block group of adifferent time, the prediction block T0 has the highest priority level,and the priority level is assigned in order of T0 and T1.

(Loop of Condition Determination of Spatial Prediction Block)

For the left neighboring prediction block group, conditiondeterminations are applied with the priority levels of conditiondeterminations 1, 2, 3, and 4 described below. Meanwhile, for the upperneighboring prediction block group, condition determinations are appliedwith the priority levels of condition determinations 1 and 2 describedbelow.

<Condition Determination>

Condition Determination 1: In a reference list LX that is the same asthat of the motion vector of the reference list LX, which is the motionvector difference calculation target, of the prediction block that isthe coding/decoding target, a prediction using the same reference index,in other words, the same reference picture is made also in a neighboringprediction block.Condition Determination 2: While the reference list LY is different fromthat of the motion vector of the reference list LX of the motion vectordifference calculation target of the prediction block that is thecoding/decoding target, a prediction using the same reference picture isperformed in a neighboring prediction block.Condition Determination 3: By using the reference list LX that is thesame as that of the motion vector of the reference list LX of the motionvector difference calculation target of the prediction block that is thecoding/decoding target, a prediction using a different reference pictureis performed for a neighboring prediction block.Condition Determination 4: By using the reference list LY different fromthe motion vector of the reference list LX of the motion vectordifference calculation target of the prediction block that is thecoding/decoding target, a prediction using a different reference pictureis performed for a neighboring prediction block.

In a case where any one of such conditions is satisfied, a motion vectorsatisfying the condition is employed as a prediction vector candidate inthe prediction block, and the subsequent condition determinations arenot made. In addition, in a case where the condition of ConditionDetermination 1 or Condition Determination 2 is satisfied, the motionvector of the corresponding neighboring prediction block is the same asthe reference picture of the coding target prediction block and isdirectly set as the motion vector predictor candidate. On the otherhand, in a case where the condition of Condition Determination 3 or 4 issatisfied, the motion vector of the corresponding neighboring predictionblock is different from the reference picture of the prediction blockthat is the coding target, and accordingly, the motion vector predictorcandidate is calculated by performing scaling based on the motionvector.

The above-described four condition determinations are made by scanningprediction blocks within the prediction block group in the followingsequence, whereby a prediction vector is determined.

<Prediction Vector Scanning Sequence>

The determination of the motion vector predictor using the samereference picture for which scaling calculation is not necessary isconfigured to the priority, and two condition determinations out of thefour condition determinations are made for each prediction block, and,in a case where the conditions are not satisfied, the next conditiondetermination of the prediction block is made. First, ConditionDeterminations 1 and 2 are made for each prediction block disposedwithin the neighboring prediction block group, and next, ConditionDeterminations 3 and 4 are made for each prediction block disposedwithin the neighboring prediction block group.

More specifically, the condition determinations are made in thefollowing priority levels (here, N is A or B).

1. Condition Determination 1 of Prediction Block N0 (the same referencelist LX and the same reference picture)2. Condition Determination 2 of Prediction Block N0 (a differentreference list LY and the same reference picture)3. Condition Determination 1 of Prediction Block N1 (the same referencelist LX and the same reference picture)4. Condition Determination 2 of Prediction Block N1 (a differentreference list LY and the same reference picture)5. Condition Determination 1 of Prediction Block N2 (the same referencelist LX and the same reference picture)6. Condition Determination 2 of Prediction Block N2 (a differentreference list LY and the same reference picture)7. Condition Determination 3 of Prediction Block N0 (the same referencelist LX and a different reference picture)8. Condition Determination 4 of Prediction Block N0 (a differentreference list LY and a different reference picture)9. Condition Determination 3 of Prediction Block N1 (the same referencelist LX and a different reference picture)10. Condition Determination 4 of Prediction Block N2 (a differentreference list LY and a different reference picture)11. Condition Determination 3 of Prediction Block N1 (the same referencelist LX and a different reference picture)12. Condition Determination 4 of Prediction Block N2 (a differentreference list LY and a different reference picture)

By performing the scanning as described above, a motion vectorpredictor, which has high prediction accuracy, using the same referencepicture for which the scaling calculation is not necessary can be easilyselected, and accordingly, the coding amount of the motion vectordifference decreases, and there is an advantage of improving the codingefficiency.

Here, in the left neighboring prediction block group, the group isconfigured by two prediction blocks, and accordingly, the sequences of5, 6, 11, and 12 of the above-described scanning are not performed.

In addition, in the upper neighboring prediction block group, the groupis configured by three prediction blocks, and accordingly, the sequencesof 1 to 12 of the above-described scanning can be performed. However, inthe present invention, only the sequences 1 to 6 of the above-describedscanning are performed, but the sequences 7 to 12 are not performed(Condition Determinations 3 and 4 are not made). In other words, in theupper neighboring prediction block group, the scanning under thecondition for which the scaling calculation is necessary is omitted.

In this way, the scaling calculation for which the division of the upperneighboring prediction block group is necessary can be omitted, andaccordingly, the scaling calculation can be limited only to theprediction vector candidates of the left neighboring prediction blockgroup. In a case where the left neighboring prediction block group andthe upper neighboring prediction block group are processed in a parallelmanner, as a spatial prediction vector candidate, only one scalingcalculation circuit may be included, whereby the circuit scale can bereduced. In addition, in the case where the left neighboring predictionblock group and the upper neighboring prediction block group areprocessed in a parallel manner, a difference in the processing amountaccording to a difference in the number of configured prediction blockswithin the neighboring prediction block group can be decreased. In otherwords, by omitting the process of the scaling calculating of the upperneighboring prediction block group of which the number of predictionblocks is large, the maximal calculation amount at which a bottle neckphenomenon occurs can be reduced. As a result, a difference between thecalculation amount of the left neighboring prediction block group andthe calculation amount of the upper neighboring prediction block groupdecreases, whereby the parallel processing can be efficiently performed.

The flow of the above-described process will be described in detail withreference to flowcharts illustrated in FIGS. 17 to 21.

The derivation of motion information from a neighboring block will bedescribed. In this embodiment, a line buffer and a block buffer in whichthe motion information is stored are arranged. In a case where themotion information is derived from a prediction block neighboring to theleft side, the motion information is derived from the block buffer, and,for a prediction block neighboring to the upper side, in a case wherethe prediction block neighboring to the upper side is within the treeblock, similarly to the case of the prediction block neighboring to theleft side, the motion information is derived from the block buffer. Onthe other hand, in a case where the prediction block neighboring to theupper side is disposed outside the tree block, the motion information isderived from the line buffer.

Here, in order to decrease the amount of usage of the internal memory byreducing the size of the line buffer of the motion information, the sizeof the line buffer in which the motion information is stored iscompressed to ½ in the horizontal direction. More specifically, in orderto predict a motion vector of a neighboring block that has not beencoded, while the block buffer stores the motion information in a minimalunit (for example, a 4×4 block) of the motion compensation so as to beprepared for an access from a neighboring block, the line buffer thinsout motion information in a unit (for example, a 4×8 block) that istwice the minimal unit of the motion compensation in the horizontaldirection and stores the thinned out motion information in the linebuffer. Accordingly, in a case where a block neighboring in the verticaldirection is disposed outside the tree block, there is a possibility ofderiving motion information that is different from the actual motioninformation of the block. In other words, by compressing the size of theline buffer of the motion information to ½ in the horizontal direction,consequently, a motion vector predictor derived from the predictionblock group neighboring to the upper side has reliability of the motionvector predictor lower than the motion vector predictor derived from theprediction block group neighboring to the left side. One of the reasonsfor omitting the scanning under the condition at which the scalingcalculation is necessary in the prediction block group neighboring tothe upper side is that, even when the scaling calculation of the motionvector predictor from the prediction block group neighboring to theupper side is omitted by reducing the size of the line buffer, there isa low influence on the coding efficiency.

Here, while the compression ratio of the line buffer has been describedas ½, apparently, as the compression ratio increases, the reliability ofthe motion vector predictor derived from the prediction block groupneighboring to the upper side is lowered, and accordingly, the effect ofomitting scanning under a condition at which the scaling calculation isnecessary in the prediction block group neighboring to the upper side isimproved.

The calculation of the prediction vector candidate mvLXCol from theprediction block group of a different time will be described later indetail with reference to flowcharts illustrated in FIGS. 24 to 30.

Description will be presented with reference back to FIG. 12. Next, themotion vector predictor candidate adding unit 122 stores the calculatedmotion vector predictor candidates mvLXCol, mvLXA, and mvLXB in themotion vector predictor list mvpListLX.

Next, the motion vector predictor redundant candidate removing unit 123compares the motion vector values of the motion vector predictorcandidates that are stored in the motion vector predictor list mvpListLXof the reference list LX with each other, determines motion vectorpredictor candidates having the same motion vector values out of themotion vector predictor candidates, leaves a first one of the motionvector predictor candidates determined to have the same motion vectorvalues, and removes the other motion vector predictor candidates fromthe motion vector predictor list mvpListLX so as not to allow the motionvector predictor candidates to be redundant, thereby updating the motionvector predictor list mvpListLX.

The motion vector predictor candidate number limiting unit 124 countsthe number of the motion vector predictor candidates added in the motionvector predictor list mvpListLX of the reference list LX and sets thenumber numMVPCandLX of the motion vector predictor candidates of thereference list LX to the value of the number of counted candidates.

In addition, the motion vector predictor candidate number limiting unit124 fixes the number numMVPCandLX of the motion vector predictorcandidates of the reference list LX added in the motion vector predictorlist mvpListLX of the reference list LX to a set final numberfinalNumMVPCand of candidates.

In this embodiment, the final number finalNumMVPCand of candidates isset to “2”. The reason for fixing the number of prediction vectorcandidates is that, when the number of motion vector predictorcandidates added in the motion vector predictor list varies inaccordance with the construction state of the motion vector predictorlist, unless the motion vector predictor list is constructed on thedecoding side, entropy decoding of the motion vector predictor indexcannot be performed. Accordingly, the dependency between theconstruction of the motion vector predictor list and the entropydecoding occurs, and there is a possibility of the occurrence ofawaiting time for the entropy decoding. In addition, in a case where theentropy decoding depends on the construction state of the motion vectorpredictor list including the motion vector predictor candidate mvLXColderived from the prediction block of a picture of a different time, whenan error occurs at the time of decoding the bitstream of a differentpicture, the bitstream of the present picture is influenced by theerror, and accordingly, there is a problem in that the entropy decodingcannot be normally continued. By setting the final numberfinalNumMVPCand of candidates to a fixed number, the entropy decoding ofthe motion vector predictor index can be performed independently fromthe construction of the motion vector predictor list, and, even when anerror occurs at the time of decoding the bitstream of a differentpicture, the entropy decoding of the bit stream of the present picturecan be continued without having the influence thereof.

In a case where the number numMVPCandLX of the motion vector predictorcandidates of the reference list LX is smaller than the set final numberfinalNumMVPCand of candidates, the motion vector predictor candidatenumber limiting unit 124 adds motion vectors having a value of (0, 0) tothe motion vector predictor list mvpListLX until the number numMVPCandLXof motion vector predictor candidates is the same as the final numberfinalNumMVPCand of candidates, thereby limiting the number of the motionvector predictor candidates to the set value. In this case, while themotion vectors having the value of (0, 0) maybe redundantly added, evenwhen the motion vector predictor index has a specific value within arange from “0” to (set number of candidates −1), the motion vectorpredictor can be determined on the decoding side. On the other hand, ina case where the number numMVPCandLX of motion vector predictorcandidates of the reference list LX is larger than the set final numberfinalNumMVPCand of the candidates, all the elements added in indexeslarger than “finalNumMVPCand −1” are removed from the motion vectorpredictor list mvpListLX so as to allow the number numMVPCandLX of themotion vector predictor candidates of the reference list LX to be thesame as the final number finalNumMVPCand of candidates, whereby thenumber of the motion vector predictor candidates is limited to the setvalue. The updated motion vector predictor list mvpListLX is supplied tothe motion vector predictor candidate coding amount calculating unit 125and the motion vector predictor selecting unit 126.

Meanwhile, the motion vector detecting unit 102, which is illustrated inFIG. 1, detects a motion vector mvLX of the reference list LX (here, X=0or 1) for each prediction block. Such a motion vector mvLX is suppliedto the motion vector predictor candidate coding amount calculating unit125 together with the motion vector predictor candidates of the updatedmotion vector predictor list mvpListLX.

The motion vector predictor candidate coding amount calculating unit 125calculates a motion vector difference with respect to the motion vectormvLX for each motion vector predictor candidate mvpListLX[i] stored inthe motion vector predictor list mvpListLX of the reference list LX(here, X=0 or 1), respectively calculates the coding amounts when themotion vector differences are coded, and supplies them to the motionvector predictor selecting unit 126.

The motion vector predictor selecting unit 126 selects a motion vectorpredictor candidate mvpListLX[i], for which the coding amount is theminimum of the coding amounts for the motion vector predictorcandidates, from among elements added in the motion vector predictorlist mvpListLX of the reference index LX as the motion vector predictormvpLX of the reference list LX. In a case where there are a plurality ofmotion vector predictor candidates, for which the generated codingamount is the minimum, in the motion vector predictor list mvpListLX, amotion vector predictor candidate mvpListLX[i] for which the index iincluded in the motion vector predictor list mvpListLX has a smallestvalue is selected as an optimal motion vector predictor mvpLX of thereference list LX. Then, the selected motion vector predictor mvpLX issupplied to the motion vector subtraction unit 127. In addition, theindex i included in the motion vector predictor list corresponding tothe selected motion vector predictor mvpLX is output as the motionvector predictor index mvpIdxLX of the reference list LX.

Finally, the motion vector subtraction unit 127 calculates a motionvector difference mvdLX of the reference list LX by subtracting theselected motion vector predictor mvpLX of the reference list LX from themotion vector mvLX of the reference list LX and outputs the motionvector difference mvdLX.

mvdLX=mvLX−mvpLX

Referring back to FIG. 1, the motion compensation predicting unit 105acquires a predicted picture signal by performing motion compensation inaccordance with the motion vector mvLX of the reference list LX (here,X=0 or 1) supplied from the motion vector detecting unit 102 byreferring to a picture signal of a decoded picture that is stored in thedecoded picture memory 115 and supplies the acquired predicted picturesignal to the prediction method determining unit 106.

The prediction method determining unit 106 determines a predictionmethod. A coding amount and a coding distortion are calculated for eachprediction mode, and a prediction block size and a prediction mode forwhich the generated coding amount and the coding distortion are thesmallest are determined. The coding amount of the motion information iscalculated by coding the motion vector difference mvdLX of the referencelist LX supplied from the motion vector subtraction unit 127 of themotion vector difference calculating unit 103 and the motion vectorpredictor index mvpIdxLX of the reference list LX representing themotion vector predictor supplied from the motion vector predictorselecting unit 126. In addition, the coding amount of a predictionresidual signal that is acquired by coding a prediction residual signalbetween the predicted picture signal supplied from the motioncompensation predicting unit 105 and the coding target picture signalsupplied from the picture memory 101 is calculated. Then, a totalgenerated coding amount acquired by adding the coding amount of themotion information and the coding amount of the prediction residualsignal is calculated and is set as a first evaluation value.

In addition, after such a prediction residual signal is coded, the codedprediction residual signal is decoded for the evaluation of thedistortion amount, and a coding distortion is calculated as a rate thatrepresents an error from the original picture signal that occurs inaccordance with the coding. By comparing the total generated codingamounts and the coding distortions of motion compensations with eachother, the prediction block size and the prediction mode for which thegenerated coding amount and the coding distortion are the smallest aredetermined. The prediction method of the motion vector described aboveis used for the motion vector mvLX according to the prediction mode ofthe determined prediction block size, and an index mvpIdxLX representingthe motion vector predictor is coded as a syntax element mvp_idx_lX[i]that is represented as a second syntax pattern in units of predictionblocks. In addition, while the generated coding amount calculated hereis preferably acquired by simulating the coding process, the generatedcoding amount may be approximated in a simple manner or be roughlyestimated.

(Prediction of Motion Vector in Decoding)

In a moving picture decoding device that decodes the bitstream of acoded moving picture based on the above-described syntax, the operationaccording to the motion vector predicting method of the presentinvention will now be described.

In a case where the motion vector predicting method according to anembodiment is performed, the process is performed by the motion vectorcalculating unit 204 of the moving picture decoding device illustratedin FIG. 2. FIG. 13 is a diagram that illustrates a detailedconfiguration of the motion vector calculating unit 204 of the movingpicture decoding device illustrated in FIG. 2 that corresponds to themoving picture coding device according to the embodiment. A portion ofFIG. 13 that is surrounded by a thick frame line illustrates the motionvector calculating unit 204. In addition, a portion that is surroundedby a thick dotted line on the inside thereof illustrates operating unitsaccording to the motion vector predicting method to be described laterand is installed similarly to the moving picture coding device, so thatthe same determination result having no contradiction between the codingprocess and the decoding process is acquired. Hereinafter, the motionvector predicting method in the decoding process will be described withreference to this drawing.

The motion vector calculating unit 204 includes: a motion vectorpredictor candidate generating unit 221; a motion vector predictorcandidate adding unit 222; a motion vector predictor redundant candidateremoving unit 223; a motion vector predictor candidate number limitingunit 224; a motion vector predictor selecting unit 225; and a motionvector addition unit 226.

In a motion vector calculating process performed by the motion vectorcalculating unit 204, a motion vector used in the inter prediction iscalculated for each of the reference lists L0 and L1. More specifically,in a case where the prediction mode PredMode of the coding target blockis the inter prediction MODE_INTER, and the inter prediction mode of thecoding target block is the L0 prediction Pred_L0, a motion vectorpredictor list mvpListL0 of the reference list L0 is calculated, amotion vector predictor mvpL0 is selected, and a motion vector mvL0 ofthe reference list L0 is calculated. On the other hand, in a case wherethe inter prediction mode of the coding target block is the L1prediction Pred_L1, a motion vector predictor list mvpListL1 of thereference list L1 is calculated, a motion vector predictor mvpL1 isselected, and a motion vector mvL1 of the reference list L1 iscalculated. In addition, in a case where the inter prediction mode ofthe coding target block is the bi-prediction Pred_BI, both the L0prediction and the L1 prediction are performed, whereby a motion vectorpredictor list mvpListL0 of the reference list L0 is calculated, amotion vector predictor mvpL0 of the reference list L0 is selected, anda motion vector mvL0 of the reference list L0 is calculated, and amotion vector predictor list mvpListL1 of the reference list L1 iscalculated, a motion vector predictor mvpL1 of the reference list L1 iscalculated, and a motion vector mvL1 of the reference list L1 iscalculated.

Similarly to the coding side, also on the decoding side, while themotion vector calculating process is performed for each of the referencelists L0 and L1, the motion vector calculating process is common to boththe reference lists L0 and L1. Accordingly, in the followingdescription, L0 and L1 will be denoted by common LX. In the motionvector calculating process of the reference list L0, X is “0”, and inthe motion vector calculating process of the reference list L1, X is“1”. In addition, during the motion vector calculating process of thereference list LX, in a case where information of not the reference listLX but information of the other list is referred to, the other list willbe denoted by LY.

The motion vector predictor candidate generating unit 221, the motionvector predictor candidate adding unit 222, the motion vector predictorredundant candidate removing unit 223, and the motion vector predictorcandidate number limiting unit 224 arranged inside the motion vectorcalculating unit 204 are regulated to respectively perform the sameoperations of the motion vector predictor candidate generating unit 121,the motion vector predictor candidate adding unit 122, the motion vectorpredictor redundant candidate removing unit 123, and the motion vectorpredictor candidate number limiting unit 124 arranged inside the motionvector difference calculating unit 103 on the coding side, whereby thesame motion vector predictor candidates having no contradiction betweenthe coding side and the decoding side can be acquired on the coding sideand the decoding device.

The motion vector predictor candidate generating unit 221 performs thesame process as that of the motion vector predictor candidate generatingunit 121 on the coding side illustrated in FIG. 12. The motion vectorsof a decoded prediction block neighboring to the decoding target blockwithin the picture of the decoding target block, a decoded predictionblock present at the same position as that of the decoding target blockor at a position neighboring thereto within a different picture, and thelike, which are decoded and recorded in the coding information storingmemory 209, are read from the coding information storing memory 209.From the motion vectors of a decoded different block read from thecoding information storing memory 209, motion vector predictorcandidates mvLXCol, mvLXA, and mvLXB are generated for each predictionblock group and are supplied to the motion vector predictor candidateadding unit 222.

The motion vector predictor candidates mvLXCol, mvLXA, and mvLXB may becalculated by performing scaling in accordance with the reference index.Since the motion vector predictor candidate generating unit 221 performsthe same process as that of the motion vector predictor candidategenerating unit 121 on the coding side illustrated in FIG. 12, detaileddescription thereof will not be presented here.

Next, the motion vector predictor candidate adding unit 222 performs thesame process as that of the motion vector predictor candidate addingunit 122 on the coding side illustrated in FIG. 12. The calculatedmotion vector predictor candidates mvLXCol, mvLXA, and mvLXB are storedin the motion vector predictor list mvpListLX of the reference list LX.

Next, the motion vector predictor redundant candidate removing unit 223performs the same process as that of the motion vector predictorredundant candidate removing unit 123 on the coding side illustrated inFIG. 12. The motion vector predictor candidates having the same motionvector values out of the motion vector predictor candidates stored inthe motion vector predictor list mvpListLX of the reference list LX aredetermined, a first one of the motion vector predictor candidatesdetermined to have the same motion vector values is left, and the othermotion vector predictor candidates are removed from the motion vectorpredictor list mvpListLX so as not to allow the motion vector predictorcandidates to be redundant, whereby the motion vector predictor listmvpListLX is updated.

Next, the motion vector predictor candidate number limiting unit 224performs the same process as that of the motion vector predictorcandidate number limiting unit 124 on the coding side illustrated inFIG. 12. The motion vector predictor candidate number limiting unit 224counts the number of elements added in the motion vector predictor listmvpListLX and sets the number numMVPCandLX of the motion vectorpredictor candidates of the reference list LX to the value of the numberof counted candidates.

In addition, for the same reason described on the coding side, themotion vector predictor candidate number limiting unit 224 fixes thenumber numMVPCandLX of the motion vector predictor candidates of thereference list LX added in the motion vector predictor list mvpListLX toa final number finalNumMVPCand of candidates.

In this embodiment, the final number finalNumMVPCand of candidates isset to “2”. In a case where the number numMVPCandLX of the motion vectorpredictor candidates of the reference list LX is smaller than the setfinal number finalNumMVPCand of candidates, motion vectors having avalue of (0, 0) are added to the motion vector predictor list mvpListLXuntil the number numMVPCandLX of motion vector predictor candidates isthe same as the final number final NumMVPCand of candidates, therebylimiting the number of the motion vector predictor candidates to the setvalue. In this case, while the motion vectors having the value of (0, 0)may be redundantly added, even when the motion vector predictor indexhas a specific value within a range from “0” to “set value −1”, themotion vector predictor can be determined on the decoding side. On theother hand, in a case where the number numMVPCandLX of motion vectorpredictor candidates of the reference list LX is larger than the setfinal number finalNumMVPCand of the candidates, all the elements addedin indexes larger than “finalNumMVPCand −1” are removed from the motionvector predictor list mvpListLX so as to allow the number numMVPCandLXof the motion vector predictor candidates of the reference list LX to bethe same as the final number finalNumMVPCand of candidates, whereby thenumber of the motion vector predictor candidates is limited to the setvalue. The updated motion vector predictor list mvpListLX is supplied tothe motion vector predictor selecting unit 225.

Meanwhile, the motion vector difference mvdLX of the reference list LX(here, X=0 or 1) for each prediction block decoded by the firstbitstream decoding unit 202 is supplied to the motion vector additionunit 226. In addition, the motion vector predictor index mvpIdxLX of themotion vector predictor of the reference list LX that is decoded by thefirst bitstream decoding unit 202 is supplied to the motion vectorpredictor selecting unit 225.

The motion vector predictor selecting unit 225 is supplied with themotion vector predictor index mvpIdxLX of the reference list LX decodedby the first bitstream decoding unit 202 and extracts a motion vectorpredictor candidate mvpListLX[mvpIdxLX] corresponding to the suppliedindex mvpIdxLX from the motion vector predictor list mvpListLX as themotion vector predictor mvpLX of the reference list LX. The suppliedmotion vector predictor candidate is supplied to the motion vectoraddition unit 226 as the motion vector predictor mvpLX.

Finally, the motion vector addition unit 226 calculates the motionvector my of the reference list LX by adding the motion vectordifference mvdLX of the reference list LX that is decoded and suppliedby the first bitstream decoding unit 202 and the motion vector predictormvpLX of the reference list LX and outputs the motion vector mvLX.

mvLX=mvpLX+mvdLX

As described above, the motion vector mvLX of the reference list LX iscalculated for each prediction block. A predicted picture signal isgenerated by performing motion compensation using the motion vector andis added to the decoded prediction residual signal, whereby a decodedpicture signal is generated.

The process sequences of the motion vector difference calculating unit103 of the moving picture coding device and the motion vectorcalculating unit 204 of the moving picture decoding device will berespectively described with reference to flowcharts illustrated in FIGS.14 and 15. FIG. 14 is a flowchart that illustrates the sequence of themotion vector difference calculating process performed by the movingpicture coding device, and FIG. 15 is a flowchart that illustrates thesequence of the motion vector calculating process of the moving picturedecoding device.

The sequence of the motion vector difference calculating process on thecoding side will be described with reference to FIG. 14. On the codingside, first, the final number finalNumMVCand of the motion vectorpredictor candidates is set by the motion vector difference calculatingunit 103 (S100). In this embodiment, the final number finalNumMVPCand ofcandidates is set to “2”.

Subsequently, the motion vector difference of the motion vector used inthe inter prediction that is selected as the coding target block iscalculated for each of the reference lists L0 and L1 by the motionvector difference calculating unit 103 (S101 to S106).

In a case where the motion vector difference mvdLX of the reference listLX is calculated (Yes in S102), the motion vector predictor candidatesof the reference list LX are calculated so as to construct the motionvector predictor list mvpListLX of the reference list LX (S103). Aplurality of the motion vector predictor candidates are calculated bythe motion vector predictor candidate generating unit 121 of the motionvector difference calculating unit 103, the calculated motion vectorpredictor candidates are added to the motion vector predictor listmvpListLX by the motion vector predictor candidate adding unit 122,unnecessary motion vector predictor candidates are removed by the motionvector predictor redundant candidate removing unit 123, and the numberof motion vector predictor candidates is fixed to the numbernumMVPCandLX of motion vector predictor candidates of the reference listLX that are added in the motion vector predictor list mvpListLX by themotion vector predictor candidate number limiting unit 124, whereby themotion vector predictor list mvpListLX is constructed. A detailedprocess sequence of step S103 will be described later with reference toa flowchart illustrated in FIG. 16.

Subsequently, the motion vector predictor mvpLX of the reference list LXis selected from the motion vector predictor list mvpListLX of thereference list LX by the motion vector predictor candidate coding amountcalculating unit 125 and the motion vector predictor selecting unit 126(S104). First, each motion vector difference that is a differencebetween the motion vector mvLX and each motion vector predictorcandidate mvpListLX[ i] stored in the motion vector predictor listmvpListLX is calculated by the motion vector predictor candidate codingamount calculating unit 125, the coding amount when the motion vectordifference is coded is calculated for each element of the motion vectorpredictor list mvpListLX, and the motion vector predictor candidatemvpListLX[i], for which the coding amount for each motion vectorpredictor candidate is the minimum is selected from among the elementsadded in the motion vector predictor list mvpListLX as the motion vectorpredictor mvpLX by the motion vector predictor selecting unit 126. In acase where there are a plurality of motion vector predictor candidates,for which the generated coding amount is the minimum, in the motionvector predictor list mvpListLX, a motion vector predictor candidatemvpListLX[i] for which the index i included in the motion vectorpredictor list mvpListLX has a smallest value is selected as an optimalmotion vector predictor mvpLX.

Subsequently, by subtracting the selected motion vector predictor mvpLXof the reference list LX from the motion vector mvLX of the referencelist LX using the motion vector subtraction unit 127, the motion vectordifference mvdLX of the reference list LX is calculated (S105).

mvdLX=mvLX−mvpLX

Next, the sequence of the motion vector calculating process on thedecoding side will be described with reference to FIG. 15. Also on thedecoding side, the motion vector used in the inter prediction iscalculated for each of the reference lists L0 and L1 by the motionvector calculating unit 204 (S201 to S206).

In a case where the motion vector mvdLX of the reference list LX iscalculated (Yes in S202), the motion vector predictor candidates of thereference list LX are calculated so as to construct the motion vectorpredictor list mvpListLX of the reference list LX (S203). A plurality ofthe motion vector predictor candidates within the motion vectorcalculating unit 204 are calculated by the motion vector predictorcandidate generating unit 221, the calculated motion vector predictorcandidates are added to the motion vector predictor list mvpListLX bythe motion vector predictor candidate adding unit 222, unnecessarymotion vector predictor candidates are removed by the motion vectorpredictor redundant candidate removing unit 223, and the number ofmotion vector predictor candidates is fixed to the number numMVPCandLXof motion vector predictor candidates of the reference list LX that areadded in the motion vector predictor list mvpListLX by the motion vectorpredictor candidate number limiting unit 224, whereby the motion vectorpredictor list mvpListLX is constructed. A detailed process sequence ofstep S203 will be described later with reference to the flowchartillustrated in FIG. 16.

Subsequently, the motion vector predictor candidate mvpListLX[mvpIdxLX]corresponding to the index mvpIdxLX of the motion vector predictordecoded by the first bitstream decoding unit 202 is extracted from themotion vector predictor list mvpListLX as the selected motion vectorpredictor mvpLX by the motion vector predictor selecting unit 225(S204).

Subsequently, by adding the motion vector difference mvdLX of thereference list LX, which is decoded and supplied by the first bitstreamdecoding unit 202, and the motion vector predictor mvpLX of thereference list LX using the motion vector addition unit 226, the motionvector mvLX of the reference list LX is calculated (S205).

mvLX=mvpLX+mvdLX

Next, the sequence of the process of deriving motion vector predictorcandidates and constructing a motion vector predictor list that iscommon to S103 illustrated in FIGS. 14 and S203 illustrated in FIG. 15will be described in detail with reference to the flowchart illustratedin FIG. 16.

(Method of Prediction of Motion Vector)

FIG. 16 is a flowchart that illiterates the process sequence of themotion vector predictor candidate generating units 121 and 221, themotion vector predictor candidate adding units 122 and 222, the motionvector predictor redundant candidate removing units 123 and 223, and themotion vector predictor candidate number limiting units 124 and 224 thathave functions common to the motion vector difference calculating unit103 of the moving picture coding device and the motion vectorcalculating unit 204 of the moving picture decoding device.

First, the motion vector predictor candidate generating unit 121 or 221derives motion vector predictor candidates from a prediction block of apicture of a different time and derives a flag availableFlagLXColrepresenting whether or not a motion vector predictor candidate of aprediction block of a picture of a different time can be used, a motionvector mvLXCol, a reference index refIdxCol, and a list ListCol (S301illustrated in FIG. 16). The sequence of the deriving process of stepS301 will be described in detail as below with reference to flowchartsillustrated in FIGS. 24 to 30.

Subsequently, the motion vector predictor candidate generating unit 121or 221 derives motion vector predictor candidates from a predictionblock that is neighboring to the left side and derives a flagavailableFlagLXA representing whether or not the motion vector predictorcandidate of the prediction block neighboring to the left side can beused, a motion vector mvLXA, a reference index refIdxA, and a list ListA(S302 illustrated in FIG. 16). In addition, X is “0” in the case of thereference list L0, and X is “1” in the case of the reference list L1(the same in the description presented below). Subsequently, the motionvector predictor candidate generating unit 121 or 221 derives motionvector predictor candidates from a prediction block that is neighboringto the upper side and derives a flag availableFlagLXB representingwhether or not the motion vector predictor candidate of the predictionblock neighboring to the upper side can be used, a motion vector mvLXB,a reference index refIdxB, and a list ListB (S303 illustrated in FIG.16). The processes of steps S302 and S303 illustrated in FIG. 16 arecommon except that the positions and the numbers of neighboring blocksto be referred to are different from each other, and the scanningsequences of the neighboring blocks are different from each other andderives a flag availableFlagLXN representing whether or not the motionvector predictor candidate of the prediction block can be used, a motionvector mvLXN, a reference index refIdxN, and a list ListN (here, N is Aor B, which is the same in the description presented below). The processsequence of S302 and S303 will be described below in detail withreference to flowcharts illustrated in FIGS. 17 to 21.

Subsequently, the motion vector predictor candidate adding unit 122 or222 constructs a motion vector predictor list mvpListLX and adds theprediction vector candidates mvLXCol, mvLXA, and mvLXB of each referencelist LX (S304 illustrated in FIG. 16). The sequence of the registrationprocess of step S304 will be described below in detail with reference tothe flowchart illustrated in FIG. 31.

Subsequently, the motion vector predictor redundant candidate removingunit 123 or 223, in a case where the spatial prediction vector candidatemvLXA derived from the prediction block group neighboring to the leftside and the spatial motion vector predictor candidate mvLXB derivedfrom the prediction block group neighboring to the upper side, which aredisposed within the motion vector predictor list mvpListLX have the samevalue, determines one thereof as a redundant motion vector candidate,leaves the motion vector candidate mvLXA arranged in the former order,in other words, the motion vector candidate mvLXA of a motion vectorhaving the smallest index i, and removes the redundant motion vectorcandidate mvLXB (S305 illustrated in FIG. 16). In the redundantcandidate removing/comparing unit, the motion vector redundancycomparison between the time motion vector predictor candidate mvLXColand the spatial motion vector predictor candidate mvLXA or mvLXB is notperformed. The reason for this is as follows. The generation of the timemotion vector predictor candidate and the generation of the spatialmotion vector predictor candidate are processed frequently in a parallelmanner due to a difference in the motion information memories thereof tobe accessed and a difference in the processing amounts thereof. Thus, ina case where a motion vector comparison between the time motion vectorpredictor candidate and the spatial motion vector predictor candidate ismade, it is necessary to advance the synchronization in a case where theparallel processing is performed, and the standby time of one of theprocesses increases. Accordingly, it is preferable to separate theprocess of deriving the time motion vector predictor candidate and theprocess of deriving the spatial motion vector predictor candidate fromeach other as possibly as can, thus, in the present invention, themotion vector redundancy comparison between the time motion vectorpredictor candidate and the spatial motion vector predictor candidate isnot performed. Since the process of deriving the time motion vectorpredictor and the process of deriving the spatial motion vectorpredictor are different from each other, motion vector predictors ofmutually different characteristics are derived. Accordingly, there is alow probability that the time motion vector predictor and the spatialmotion vector predictor are the same, and there is no decrease in thecoding efficiency even when the motion vector comparison between thetime motion vector predictor candidate and the spatial motion vectorpredictor candidate is not made. The sequence of the removal process ofstep S305 will be described below in detail with reference to theflowchart illustrated in FIG. 32.

Subsequently, the motion vector predictor candidate number limiting unit124 or 224 counts the number of elements added in the motion vectorpredictor list mvpListLX, sets the number numMVPCandLX of the motionvector predictor candidates of the reference list LX to the number ofthe added elements, and limits the number numMVPCandLX of the motionvector predictor candidates of the reference list LX added in the motionvector predictor list mvpListLX to the set final number finalNumMVPCandof candidates (S306 illustrated in FIG. 16). The sequence of the removalprocess of step S306 will be described below in detail with reference tothe flowchart illustrated in FIG. 33.

The sequence of deriving the motion vector predictor candidate from theprediction blocks neighboring to the left side or the upper side in S301and S302 illustrated in FIG. 16 will be described in detail.

As illustrated in FIGS. 5, 6, 7, and 8, motion vector predictorcandidates are derived from prediction blocks disposed on the peripherythat are neighboring to a prediction block (the prediction block that isthe processing target illustrated in FIGS. 5, 6, 7, and 8) defined forperforming motion compensation of the inside of the coding block withinthe same picture.

As the motion vector predictor candidates, motion vector predictorcandidates are selected from the prediction block group A that isconfigured by prediction blocks Ak (here, k=0 or 1) neighboring to theleft side of the prediction block that is the processing target, inother words, A0 and A1 and the prediction block group B that isconfigured by the prediction block Bk (here, k=0, 1, or 2) neighboringto the upper side, in other words, B0, B1, and B2.

Next, the method of deriving the motion vector predictor candidates fromthe prediction block group N neighboring to the left side and the upperside in the sequence of the process of S301 and S302 illustrated in FIG.16 will be described. FIG. 17 is a flowchart that illustrates thesequence of the process of deriving motion vector predictor candidatesin S301 and S302 illustrated in FIG. 16 in accordance with theabove-described scanning method. Suffix X is 0 or 1 that represents areference list, and N is A (left side) or B (upper side) that representsthe area of the neighboring prediction block group.

In order to derive motion vector predictor candidates from the leftprediction block (S301 illustrated in FIG. 16) and in order to derivemotion vector predictor candidates from the prediction blocks A0 and A1neighboring to the left side of the prediction block that is thecoding/decoding target with N as A in FIG. 17 and motion vectorpredictor candidates from the upper prediction block (S302 illustratedin FIG. 16), motion vector predictor candidates are calculated in thesequence described below from prediction blocks B0, B1, and B2neighboring to the upper side with N as B in FIG. 17.

First, prediction blocks neighboring to the prediction block that is thecoding/decoding target are specified, and, in a case where theprediction block Nk (here, k=0, 1, or 2; 2 is only for an upperprediction block group) can be used, the coding information stored inthe coding information storing memory 114 or the coding informationstoring memory 209 is derived. Here, the coding information of theneighboring prediction block Nk to be derived includes a prediction modePredMode, a flag predFlagLX [xNk][yNk] representing whether thereference list LX is used, a reference index refIdxLX [xNk][yNk] of thereference list LX, a motion vector mvLX [xNk][yNk] of the reference listLX. In the case of a prediction block group (N=A) neighboring to theleft side of the prediction block that is the coding/decoding target(Yes in S1101), the coding information is derived by specifying aprediction block A0 neighboring to the lower left side and a predictionblock A1 neighboring to the left side (S1102 and S1103). On the otherhand, in the case of a prediction block group (N=B) neighboring to theupper side of the prediction block that is the coding/decoding target(No in S1101), the coding information is derived by specifying aprediction block B0 neighboring to the upper right side, a predictionblock B1 neighboring to the upper side, and a prediction block B2neighboring to the upper left side (S1104, S1105, and S1106). Inaddition, the neighboring prediction block Nk can be used in a casewhere the neighboring prediction block is located on the inner side of aslice including the coding/decoding target prediction block but cannotbe used in a case where neighboring prediction block is located outsidethe slice.

Next, the flag availableFlagLXN representing whether or not the motionvector predictor is selected from the prediction block group N is set to“0”, and the motion vector mvLXN representing the prediction block groupN is set to (0, 0) (S1107) .

Next, a motion vector predictor candidate satisfying ConditionDetermination 1 or Condition Determination 2 described above is derived(S1108). From among the neighboring prediction blocks N0, N1, and N2 (N2is only for the upper neighboring prediction block group B) of theprediction block group N (here, N is A or B), a prediction block havinga motion vector of a reference picture of the same reference list LXthat is the same as the reference list LX set as the current target inthe coding/decoding target prediction block or a reference list LY(Y=!X; in a case where the reference list that is the current target isL0, the opposite reference list is L1, and, in a case where thereference list that is the current target is L1, the opposite referencelist is L0) that is opposite to the reference list LX set as the currenttarget in the coding/decoding target prediction block is searched for,and the motion vector is set as the motion vector predictor candidate.

FIG. 18 is a flowchart that illustrates the sequence of the derivingprocess of step S1108 illustrated in FIG. 17. The following process isperformed for the neighboring prediction blocks Nk (here, k=0, 1, or 2;2 is only for the upper neighboring prediction block group) in order ofk=0, 1, and 2 (S1201 to S1207). The following process is performed inorder of A0 and A1 from the lower side to the upper side in a case whereN is A and in order of B0, B1, and B2 from the right side to the leftside in a case where N is B.

In a case where the neighboring prediction block Nk can be used, and theprediction mode PredMode of the prediction block Nk is not the intraprediction MODE_INTRA (Yes in S1202), condition determination of theCondition Determination 1 described above is made (S1203). In a casewhere the flag predFlagLX [xNk][yNk] representing whether to use thereference list LX of the neighboring prediction block Nk is 1, in otherwords, in a case where an inter prediction of the neighboring predictionblock Nk is made using the motion vector of the reference list LX thatis the same as that of the calculation target, and the reference indexrefIdxLX[xNk][yNk] of LX of the neighboring prediction block Nk and theindex refIdxLX of the prediction block that is the processing target arethe same, in other words, an inter prediction of the neighboringprediction block Nk is made using the same reference picture in the LXprediction (Yes in S1203), the process proceeds to step S1204, andotherwise (No in S1203), the condition determination of step S1205 ismade.

In the case of Yes in step S1203, the flag availableFlagLXN is set to“1”, the motion vector predictor mvLXN of the prediction block group Nis set to the value of the motion vector mvLX[xNk][yNk] of the referencelist LX of the neighboring prediction block Nk, the reference indexrefIdxN of the prediction block group N is set to the value of thereference index refIdxLX[xNk][yNk] of the reference list LX of theneighboring prediction block Nk, and the reference list ListN of theprediction block group N is set to LX (S1204), and then, this motionvector predictor candidate calculating process ends.

On the other hand, in the case of No in step S1203, conditiondetermination of Condition Determination 2 described above is made(S1205). In a case where the flag predFlagLY representing whether to usethe reference list LY of the neighboring prediction block Nk is 1, inother words, in a case where an inter prediction of the neighboringprediction block Nk is made using the motion vector of the referencelist LY that is different from that of the calculation target, and thePOC of the reference picture of the reference list LY opposite to thereference list LX that is the current target of the neighboringprediction block Nk and the POC of the reference picture of thereference list LX of the prediction block that is the processing targetare the same, in other words, in a case where an inter prediction of theneighboring prediction block Nk is made using the same reference picturein the LY prediction (Yes in S1205), the process proceeds to step S1206,the flag availableFlagLXN is set to “1”, the motion vector predictormvLXN of the prediction block group N is set to the value of the motionvector mvLY[xNk][yNk] of the reference list LY of the neighboringprediction block Nk, the reference index refIdxN of the prediction blockgroup N is set to the value of the reference index refIdxLY[xNk][yNk] ofthe reference list LY of the neighboring prediction block Nk, and thereference list ListN of the prediction block group N is set to LY(S1206), and then, this motion vector predictor candidate calculatingprocess ends.

In a case whether such a condition is not satisfied, in other words, inthe case of No in S1203 and No in S1205, k is increased by one, theprocess (S1201 to S1207) of the next neighboring prediction block isperformed, and the process is repeated until the flag availableFlagLXNis “1” or the process of the neighboring block A1 or B2 is completed.

Subsequently, referring back to the flowchart illustrated in FIG. 17,when the prediction block group is neighboring to the left side (N=A),and the flag availableFlagLXN is “0” (Yes in S1109), in other words, amotion vector predictor candidate cannot be calculated in step S1108 forthe prediction block group neighboring to the left side, a motion vectorpredictor candidate satisfying Condition Determination 3 or ConditionDetermination 4 described above is calculated (S1110).

FIG. 19 is a flowchart that illustrates the sequence of the derivingprocess of step S1110 illustrated in FIG. 17. The following process isperformed in order of k=0 and k=1 for the neighboring prediction blockNk (here, k=0 or 1) (S1301 to S1307).

In a case where the neighboring prediction block Nk can be used, and theprediction mode PredMode of the prediction block Nk is not the intraprediction MODE_INTRA (Yes in S1302), condition determination of theCondition Determination 3 described above is made (S1303). In a casewhere the flag predFlagLX [xNk][yNk] representing whether to use thereference list LX of the neighboring prediction block Nk is 1, in otherwords, in a case where an inter prediction of the neighboring predictionblock Nk is made using the motion vector of the reference list LX thatis the same as that of the calculation target, the process proceeds tostep S1304, and otherwise (No in S1303), the condition determination ofstep S1305 is made.

In the case of Yes in step S1303, the flag availableFlagLXN is set to“1”, the motion vector predictor mvLXN of the prediction block group Nis set to the value of the motion vector mvLX[xNk][yNk] of the referencelist LX of the neighboring prediction block Nk, the reference indexrefIdxN of the prediction block group N is set to the value of thereference index refIdxLX[xNk][yNk] of the reference list LX of theneighboring prediction block Nk, and the reference list ListN of theprediction block group N is set to LX (S1304), and then, the processproceeds to step S1308.

In the case of No in step S1303, condition determination of ConditionDetermination 4 described above is made (S1305). In a case where theflag predFlagLY representing whether to use the reference list LY of theneighboring prediction block Nk is 1, in other words, in a case where aninter prediction of the neighboring prediction block Nk is made usingthe motion vector of the reference list LY that is different from thatof the calculation target (Yes in S1305), the flag availableFlagLXN isset to “1”, the motion vector predictor mvLXN of the prediction blockgroup N is set to the value of the motion vector mvLY[xNk][yNk] of thereference list LY of the neighboring prediction block Nk, the motionvector predictor mvLXN of the prediction block group N is set to thevalue of the motion vector mvLY[xNk][yNk] of the reference list LY ofthe neighboring prediction block Nk, the reference index refIdxN of theprediction block group N is set to the value of the reference indexrefIdxLY[xNk][yNk] of the reference list LY of the neighboringprediction block Nk, and the reference list ListN of the predictionblock group N is set to LY (S1306), and then, the process proceeds tostep S1308.

On the other hand, in a case whether such a condition is not satisfied(in the case of No in S1303 and No in S1305), k is increased by one, theprocess (S1301 to S1307) of the next neighboring prediction block isperformed, and the process is repeated until the flag availableFlagLXNis “1” or the process of the neighboring block A1 is completed, and thenthe process proceeds to step S1308.

Subsequently, when the flag availableFlagLXN is “1” (Yes in S1308),scaling of the motion vector mvLXN is performed (S1309). The sequence ofthe process of calculating the scaling of the spatial motion vectorpredictor candidate in step S1309 will be described with reference toFIGS. 20 and 21.

FIG. 20 is a flowchart that illustrates the sequence of the process ofcalculating the scaling of a motion vector in step S1309 illustrated inFIG. 19.

An inter-picture distance td is calculated by subtracting the POC of thereference picture referred to by the list ListN of the neighboringprediction block from the POC of the current coding/decoding targetpicture (S1601). In a case where the reference picture referred to bythe list ListN of the neighboring prediction block is prior to thecurrent coding/decoding target picture in the display order, theinter-picture distance td has a positive value. On the other hand, in acase where the reference picture referred to by the list ListN of theneighboring prediction block is posterior to the current coding/decodingtarget picture in the display order, the inter-picture distance td has anegative value.

td=POC of current coding/decoding target picture−POC of referencepicture referred to by reference list ListN of neighboring predictionblock

Next, an inter-picture distance tb is calculated by subtracting the POCof the reference picture referred to by the list LX of the currentcoding/decoding target picture from the POC of the currentcoding/decoding target picture (S1602). In a case where the referencepicture referred to by the list LX of the current coding/decoding targetpicture is prior to the current coding/decoding target picture in thedisplay order, the inter-picture distance tb has a positive value. Onthe other hand, in a case where the reference picture referred to by thelist LX of the current coding/decoding target picture is posterior tothe current coding/decoding target picture in the display order, theinter-picture distance tb has a negative value.

tb=POC of current coding/decoding target picture−POC of referencepicture referred to by reference list LX of current coding/decodingtarget picture

Subsequently, by multiplying the motion vector mvLXN by a scaling factortb/td according to the following equation, the scaling calculationprocess is performed (S1603), and the scaled motion vector mvLXN isacquired.

mvLXN=tb/td*mvLXN

In addition, an example of a case where the scaling calculation of stepS1603 is performed as integer-precision calculation is illustrated inFIG. 21. The process of steps S1604 to S1606 illustrated in FIG. 21corresponds to the process of step S1603 illustrated in FIG. 20.

First, similarly to the flowchart illustrated in FIG. 20, theinter-picture distance td and the inter-picture distance tb arecalculated (S1601 and S1602).

Subsequently, a variable tx is calculated by using the followingequation (S1603).

tx=(16384+Abs(td/2))/td

Subsequently, a scaling factor DistScaleFactor is calculated using thefollowing equation (S1605).

DistScaleFactor=(tb*tx+32)>>6

Subsequently, a scaled motion vector mvLXN is acquired by using thefollowing equation (S1606).

mvLXN=ClipMv(Sign(DistScaleFactor*mvLXN)*((Abs(DistScaleFactor*mvLXN)+127)>>8))

Next, a method of deriving a motion vector predictor candidate from aprediction block of a picture of a different time in S303 illustrated inFIG. 16 will be described in detail. FIG. 24 is a flowchart thatillustrates the sequence of the process of deriving motion vectorpredictor candidates in step S303 illustrated in FIG. 16.

First, it is determined whether the picture colPic of a different timeis defined in the reference list L0 or the reference list L1 based onslice_type and collocated_from_10_flag (S2101 illustrated in FIG. 24).

FIG. 25 is a flowchart that illustrates the sequence of the process ofderiving a picture colPic of a different time in step S2101 illustratedin FIG. 24. In a case where slice_type is B, and the above-describedflag collocated_from_10_flag is “0” (Yes in S2201 illustrated in FIG. 25and Yes in S2202), RefPicList1[0], in other words, a picture of whichthe reference index of the reference list L1 is “0” is set as thepicture colPic of a different time (S2203 illustrated in FIG. 25).Otherwise, in other words, in a case where the above-described flagcollocated_from_10_flag is “1” (No in S2201 illustrated in FIG. 25, Noin S2202, and No in S2204), RefPicList0[0], in other words, a picture ofwhich the reference index of the reference list L0 is “0” is set as thepicture colPic of a different time (S2205 illustrated in FIG. 25).

Next, referring back to the flowchart illustrated in FIG. 24, aprediction block colPU of a different time is calculated, and the codinginformation is derived (S2102 illustrated in FIG. 24).

FIG. 26 is a flowchart that illustrates the sequence of the process ofderiving the prediction block colPU of the picture colPic of a differenttime in step S2102 of FIG. 24.

First, a prediction block located on the lower right side (outer side)at the same position as that of the prediction block that is theprocessing target within the picture colPic of a different time is setas the prediction block colPU of a different time (S2301 illustrated inFIG. 26). This prediction block corresponds to the prediction block T0illustrated in FIG. 9.

Next, in a case where the prediction block is located outside the treeblock of the prediction block coding block of a different time, and theprediction mode PredMode of the prediction block colPU is the intraprediction MODE_INTRA (S2302 and S2303 illustrated in FIG. 26), aprediction block located at the center lower right position that is thesame as the position of the prediction block that is the processingtarget within the picture colPic of a different time is reset as theprediction block colPU of a different time (S2304 illustrated in FIG.26). This prediction block corresponds to the prediction block T1illustrated in FIG. 9. The reason for changing the prediction blockcolPu to the prediction block located at the center lower right positionthat is the same as the position the prediction block, which is theprocessing target, is that the cost of a hardware memory access is highfor the derivation of the colPU information from the outside of the treeblock.

Next, referring back to the flowchart illustrated in FIG. 24, the motionvector predictor mvLXCol of the reference list LX calculated from aprediction block of a different picture that is located at the sameposition as the position of the prediction block, which is thecoding/decoding target, and a flag availableFlagLXCol representingwhether or not the coding information of the reference list LX of theprediction block group Col is valid are calculated (S2103 illustratedFIG. 24).

FIG. 27 is a flowchart that illustrates the process of deriving theinter prediction information in step S2103 illustrated in FIG. 24.

In a case where the prediction mode PredMode of the prediction blockcolPU of a different time is the intra prediction MODE_INTRA and cannotbe used (No in S2401 illustrated in FIG. 27 and No in S2402), the flagavailableFlagLXCol is set to “0”, the motion vector mvLXCol is set to(0, 0) (S2403 and S2404 illustrated in FIG. 27), and the process ends.

In a case where the prediction block colPU can be used, and theprediction mode PredMode is not the intra prediction MODE_INTRA (Yes inS2401 illustrated in FIG. 27 and Yes in S2402), the motion vector mvColand the reflection index refIdxCol are calculated in the followingsequence.

In a case where the flag PredFlagL0[xPCol][yPCol] representing whetheror not the L0 prediction of the prediction block colPU is used is “0”(Yes in S2405 illustrated in FIG. 27), since the prediction mode of theprediction block colPU is Pred_L1, the motion vector mvCol is set to thevalue of MvL1 [xPCol][yPCol] that is the motion vector of L1 of theprediction block colPU (S2406 illustrated in FIG. 27), the referenceindex refIdxCol is set to the value of the reference indexRefIdxL1[xPCol][yPCol] of the reference list L1 (S2407 illustrated inFIG. 27), and the list ListCol is set to L1 (S2408 illustrated in FIG.27).

On the other hand, in a case where the L0 prediction flagPredFlagL0[xPCol][yPCol] of the prediction block colPU is not “0” (No inS2405 illustrated in FIG. 27), it is determined whether or not the L1prediction flag PredFlagL1[xPCol][yPCol] of the prediction block colPUis “0”. In a case where the L1 prediction flag PredFlagL1[xPCol][yPCol]of the prediction block colPU is “0” (Yes in S2409 illustrated in FIG.27), the motion vector mvCol is set to the value of MvL0[xPCol][yPCol]that is the motion vector of the reference list L0 of the predictionblock colPU (S2410 illustrated in FIG. 27), the reference indexrefIdxCol is set to the value of the reference index RefIdxL0[xPCol][yPCol] of the reference list L0 (S2411 illustrated in FIG. 27),and the list ListCol is set to L0 (S2412 illustrated in FIG. 27).

In a case where none of the L0 prediction flag PredFlagL0[xPCol][yPCol]of the prediction block colPU and the L1 prediction flagPredFlagL1[xPCol][yPCol] of the prediction block colPU is not “0” (No inS2405 illustrated in FIG. 27 and No in S2409), the inter prediction modeof the prediction block colPU is the bi-prediction Pred_BI, andaccordingly, one is selected from two motion vectors of the referencelists L0 and L1 (S2413 illustrated in FIG. 27).

FIG. 28 is a flowchart that illustrates the sequence of the process ofderiving inter prediction information of a prediction block when theinter prediction mode of the prediction block colPU is the bi-predictionPred_BI.

First, it is determined whether the POCs of all the pictures added inthe reference list are smaller than the POC of the currentcoding/decoding target picture (S2501). In a case where the POCs of allthe pictures added in all the reference lists L0 and L1 of theprediction block colPU are smaller than the POC of the currentcoding/decoding target picture (Yes in S2501) and in a case where X is“0”, in other words, the prediction vector candidate of the motionvector of the reference list L0 of the prediction block that is thecoding/decoding target is calculated (Yes in S2502), the interprediction information of the L0 side of the prediction block colPU isselected. On the other hand, in a case where X is “1”, in other words,the prediction vector candidate of the motion vector of the referencelist L1 of the prediction block that is the coding/decoding target iscalculated (No in S2502), the inter prediction information of the L1side of the prediction block colPU is selected. On the other hand, in acase where at least one of the POCs of the pictures added in all thereference lists L0 and L1 of the prediction block colPU is larger thanthe POC of the current coding/decoding target picture (No in S2501), ina case where the flag collocated_from_10_flag is “0” (Yes in S2503), theinter prediction information of the L0 side of the prediction blockcolPU is selected. On the other hand, in a case where the flagcollocated_from_10_flag is “1” (No in S2503), the inter predictioninformation of the L1 side of the prediction block colPU is selected. Inother words, in a case where the prediction block colPU is defined usingthe reference list L1, L0 is selected as the motion vector mvCol, and,in a case where the prediction block colPU is defined using thereference list L0, L1 is selected as the motion vector mvCol. Byconfiguring the selection of the prediction block colPU and theselection list of the motion vector mvCol to be opposite to each other,a prediction vector having high precision capable of making aninterpolation prediction using a motion vector for a reference picturein a direction from the picture colPic to the coding target picture canbe calculated.

In a case where the inter prediction information of the L0 side of theprediction block colPU is selected (Yes in S2502 and Yes in S2503), themotion vector mvCol is set to the value of the MvL0[xPCol][yPCol](S2504), the reference index refIdxCol is set to the value ofRefIdxL0[xPCol][yPCol] (S2505), and the list ListCol is set to L0(S2506).

On the other hand, in a case where the inter prediction information ofthe L1 side of the prediction block colPU is selected (No in S2502 andNo in S2503), the motion vector mvCol is set to the value of theMvL1[xPCol][yPCol] (S2507), the reference index refIdxCol is set to thevalue of RefIdxL1[xPCol][yPCol] (S2508), and the list ListCol is set toL1 (S2509).

Referring back to FIG. 27, when the inter prediction information can bederived from the prediction block colPU, the flag availableFlagLXCol isset to “1” (S2414 illustrated in FIG. 27).

Next, referring back to the flowchart illustrated in FIG. 24, in a casewhere the flag availableFlagLXCol is “1” (Yes in S2104 illustrated inFIG. 24), the motion vector mvLXCol is scaled as is necessary (S2105illustrated in FIG. 24). The sequence of the process of calculating thescaling of the motion vector mvLXCol will be described with reference toFIGS. 29 and 30.

FIG. 29 is a flowchart that illustrates the sequence of the process ofcalculating the scaling of the motion vector in step S2105 illustratedin FIG. 24.

An inter-picture distance td is calculated by subtracting the POC of thereference picture referred to by the list ListCol of the predictionblock colPU from the POC of the picture colPic of a different time(S2601). In a case where the POC of the reference picture referred to bythe list ListCol of the prediction block colPU is prior to the picturecolPic of a different time in the display order, the inter-picturedistance td has a positive value. On the other hand, in a case where thePOC of the reference picture referred to by the list ListCol of theprediction block colPU is posterior to the picture colPic of a differenttime in the display order, the inter-picture distance td has a negativevalue.

td=POC of picture colPic of different time−POC of reference picturereferred to by list ListCol of prediction block colPU

An inter-picture distance tb is calculated by subtracting the POC of thereference picture referred to by the list LX of the currentcoding/decoding target picture from the POC of the currentcoding/decoding target picture (S2602). In a case where the referencepicture referred to by the list LX of the current coding/decoding targetpicture is prior to the current coding/decoding target picture in thedisplay order, the inter-picture distance tb has a positive value. Onthe other hand, in a case where the reference picture referred to by thelist LX of the current coding/decoding target picture is posterior tothe current coding/decoding target picture in the display order, theinter-picture distance tb has a negative value.

tb=POC of current coding/decoding target picture−POC of referencepicture referred to by reference list LX of current coding/decodingtarget picture

Subsequently, the inter-picture distances td and tb are compared witheach other (S2603). In a case where the inter-picture distances td andtb are the same (Yes in S2603), this scaling calculation process ends.On the other hand, in a case where the inter-picture distances td and tbare not the same (No in S2603), by multiplying the motion vector mvLXColby a scaling factor tb/td using the following equation, the scalingcalculation process is performed (S2604), whereby a scaled motion vectormvLXCol is acquired.

mvLXCol=tb/td*mvLXCol

In addition, an example of a case where the scaling calculation of stepS2604 is performed as integer-precision calculation is illustrated inFIG. 30. The process of steps S2605 to S2607 illustrated in FIG. 30corresponds to the process of step S2604 illustrated in FIG. 29.

First, similarly to the flowchart illustrated in FIG. 29, theinter-picture distance td and the inter-picture distance tb arecalculated (S2601 and S2602).

Subsequently, the inter-picture distances td and tb are compared witheach other (S2603). In a case where the inter-picture distances td andtb are the same (Yes in S2603), this scaling calculation process ends.On the other hand, in a case where the inter-picture distances td and tbare not the same (No in S2603), a variable tx is calculated by using thefollowing equation (S2605).

tx=(16384+Abs(td/2))/td

Subsequently, a scaling factor DistScaleFactor is calculated using thefollowing equation (S2606).

DistScaleFactor=(tb*tx+32)>>6

Subsequently, a scaled motion vector mvLXN is acquired by using thefollowing equation (S2607).

mvLXN=ClipMv(Sign(DistScaleFactor*mvLXN)*((Abs(DistScaleFactor*mvLXN)+127)>>8))

The sequence of adding a motion vector predictor candidate to the motionvector predictor list in S304 illustrated in FIG. 16 will be describedin detail.

The motion vector predictor candidates mvLXCol, mvLXA, and mvLXB of eachreference list LX that are calculated in S301, S302, and S303illustrated in FIG. 16 are added to the motion vector predictor listmvpListLX of the reference list LX (S304). In the embodiment of thepresent invention, priority levels are assigned, and, by adding themotion vector predictor candidates mvLXCol, mvLXA, and mvLXB to themotion vector predictor list mvpListLX of the reference list LX in orderof the priority level from the highest level to the lowest level, anelement having a high priority level is arranged to the front side ofthe motion vector predictor list. When the number of elements within themotion vector predictor list is limited in S306 illustrated in FIG. 16,by excluding elements arranged on the rear side of the motion vectorpredictor list from the motion vector predictor list, elements havinghigh priority levels are left.

The motion vector predictor list mvpListLX forms a list structure, ismanaged by an index i that represents the position inside the motionvector predictor list, and has a storage area storing the motion vectorpredictor candidate corresponding to the index i as an element beinginstalled therein. The number of the index i starts from 0, and themotion vector predictor candidate is stored in the storage area of themotion vector predictor list mvpListLX. In the subsequent process, themotion vector predictor candidate that is an element of the index iadded in the motion vector predictor list mvpListLX will be representedas mvpListLX[i].

Next, the method for the process of adding the motion vector predictorcandidates mvLXCol, mvLXA, and mvLXB of the reference list LX to themotion vector predictor list mvpListLX of the reference list LX in S304illustrated in FIG. 16 will be described in detail. FIG. 31 is aflowchart that illustrates the sequence of the process of adding motionvector predictor candidates in step S304 illustrated in FIG. 16.

First, the index i of the motion vector predictor list mvpListLX is setto “0” (S3101). In a case where the flag availableFlagLXCol is “1” (Yesin S3102), the motion vector predictor candidate mvLXCol of thereference list LX is added to a position corresponding to the index i ofthe motion vector predictor list mvpListLX (S3103), and the update isperformed by adding “1” to the index i (S3104).

Subsequently, in a case where the flag availableFlagLXA is “1” (Yes inS3105), the motion vector predictor candidate mvLXA of the referencelist LX is added to a position corresponding to the index i of themotion vector predictor list mvpListLXmvpListLX (S3106), and the updateis performed by adding “1” to the index i (S3107).

Subsequently, in a case where the flag availableFlagLXB is “1” (Yes inS3108), the motion vector predictor candidate mvLXB of the referencelist LX is added to a position corresponding to the index i of themotion vector predictor list mvpListLX (S3109), and the adding processto the motion vector predictor list ends.

In the adding sequence of the motion vector predictor list, after onetime motion vector predictor candidate is added, two spatial motionvector predictor candidates are added. In other words, the prioritylevel of the time motion vector predictor candidate is set to be higherthan that of the spatial motion vector predictor candidate.

Next, the method of removing a redundant motion vector predictorcandidate, which is included in the motion vector predictor list, inS305 illustrated in FIG. 16 will be described in detail. FIG. 32 is aflowchart that illustrates the sequence of the process of removingredundant motion vector predictor candidates in S305 illustrated in FIG.16.

The motion vector predictor redundant candidate removing unit 123 or 223compares spatially-predicted motion vector candidates added in themotion vector predictor list mvpListLX with each other (S4101). In acase where a plurality of motion vector candidates have the same value(Yes in S4102), the motion vector candidates are determined to beredundant motion vector candidates, and, in the descending order, inother words, the redundant motion vector candidates are removed exceptfor a motion vector candidate having the smallest index i (S4103). Here,a comparison of the identity of motion vector candidates is notperformed between the time motion vector predictor candidate and thespatial motion vector predictor candidate. The generation of the timemotion vector predictor candidate and the generation of the spatialmotion vector predictor candidate may be implemented thorough a parallelprocess due to a difference in the motion information memories thereofto be accessed and a difference in the processing amounts thereof. In acase where a motion vector comparison between the time motion vectorpredictor candidate and the spatial motion vector predictor candidate ismade, a standby time occurs when the parallel process is performed.Accordingly, it is preferable that there is no dependency between thetime motion vector predictor candidate and the spatial motion vectorpredictor candidate, and thus, in the present invention, the motionvector redundancy comparison between the time motion vector predictorcandidate and the spatial motion vector predictor candidate is notperformed. Here, in order to further decrease the processing amount, adetermination of whether prediction vectors are identical may not beperformed between the spatial motion vector predictor candidates. Inaddition, after the redundant motion vector candidates are removed,inside the motion vector predictor list mvpListLX, a storage area of theremoved motion vector predictor candidate is vacant, and accordingly,index i=0 is used as the reference, and the inside of the motion vectorpredictor list is filled with the motion vector predictor candidates inorder of the value of the index i in the ascending order (S4104). Forexample, in a case where a motion vector predictor candidate mvListLX[1]having an index i of “1” is removed, and the motion vector predictorcandidates mvListLX[0] and mvListLX[2] having indexes of 0 and 2 areleft, the motion vector predictor candidate mvListLX[2] Having an indexi of “2” is newly changed to a motion vector predictor candidatemvListLX[1] having an index i of “1”. In addition, a motion vectorpredictor candidate mvListLX[2] having an index of “2” is set not to bepresent.

Next, the method of limiting the number of motion vector candidatesincluded in the motion vector predictor list in S306 illustrated in FIG.16 will be described in detail. FIG. 33 is a flowchart that illustratesthe sequence of the process of limiting the number of motion vectorpredictor candidates in S306 illustrated in FIG. 16.

The motion vector predictor candidate number limiting unit 124 or 224limits the number numMVPCandLX of the motion vector predictor candidatesof the reference list LX added in the motion vector predictor listmvpListLX of the reference list LX to a set final number finalNumMVPCandof candidates.

First, the number of elements added in the motion vector predictor listmvpListLX of the reference list LX is counted, and the number of theelements is set as the number numMVPCandLX of motion vector predictorcandidates of the reference list LX (S5101).

Subsequently, in a case where the number numMVPCandLX of motion vectorpredictor candidates of the reference list LX is smaller than the finalnumber finalNumMVPCand of candidates (Yes in S5103), a motion vectorhaving the value of (0, 0) is added to a position at which the index iof the motion vector predictor list mvpListLX of the reference list LXcorresponds to numMVPCandLX (S5104), and one is added to numMVPCandLX(S5105). In a case where the number numMVPCandLX of motion vectorpredictor candidates and the final number finalNumMVPCand of candidateshave the same value (Yes in S5105), this limiting process ends. On theother hand, in a case where the number numMVPCandLX of motion vectorpredictor candidates and the final number finalNumMVPCand of candidatesdo not have the same value (No in S5105), the process of steps S5104 andS5105 is repeated until the number numMVPCandLX of motion vectorpredictor candidates and the final number finalNumMVPCand of candidateshave the same value. In other words, an MV having a value of (0, 0) isadded until the number numMVPCandLX of motion vector predictorcandidates of the reference list LX arrives at the final numberfinalNumMVPCand of candidates. As above, by adding MVs having the valueof (0, 0) redundantly, even in a case where the index of a motion vectorpredictor has a certain value in the range that is equal to or largerthan zero and is smaller than the final number finalNumMVPCand ofcandidates, the motion vector predictor can be determined.

On the other hand, in a case where the number numMVPCandLX of motionvector predictor candidates of the reference list LX is larger than thefinal number finalNumMVPCand of candidates (No in S5103 and Yes inS5107), all the motion vector predictor candidates each having the indexi of the motion vector predictor list mvpListLX of the reference list LXto be larger than “finalNumMVPCand −1” are removed (S5108), the value offinalNumMVPCand is set as the number numMVPCandLX of motion vectorpredictor candidates of the reference list LX (S5109), and this limitingprocess ends.

In a case where the number numMVPCandLX of motion vector predictorcandidates of the reference list LX is the same as the final numberfinalNumMVPCand of candidates (No in S5103 and No in S5107), thislimiting process ends without performing the limiting process.

Embodiment 2

In a second embodiment, on the decoding side, a motion vector predictoris specified without constructing a motion vector predictor list. In acase where the motion vector predictor list is constructed, while it isnecessary to perform scaling calculation for each of the spatialcandidate and the time candidate, in the second embodiment, byspecifying a motion vector predictor without generating a motion vectorpredictor list, the number of times of scaling calculation can besuppressed. A coding device according to the embodiment and a decodingdevice according to the embodiment other than that are the same as thoseof Embodiment 1. In addition, the same decoding result of the motionvector predictor as that of the first embodiment can be acquired.

FIG. 22 is a flowchart that illustrates deriving of a motion vectorpredictor on the decoding side according to Embodiment 2.

First, mvp_idx_LX that is an index of the motion vector predictorcandidate and availableFlagLXCol that represents whether or not a timecandidate can be used are derived (S2201 and S2202). The derivationorder of mvp_idx_LX and availableFlagLXCol is arbitrary, and thus theorder of S2201 and S2202 may be interchanged. Next, it is determinedwhether the values of mvp_idx_LX and availableFlagLXCol that have beenderived satisfymvp_idx_LX==0 and availableFlagLXCol==1 (S2203). Sincethe motion vector predictors are added (generated) in order of mvLXCol,mvLXA, and mvLXB, in a case where mvp_idx_LX==0 andavailableFlagLXCol==1 (Yes in S2203), the motion vector predictorcandidate can be specified as a time motion vector predictor candidate,and accordingly, a motion vector is derived from a prediction block of adifferent time, and the derived motion vector is set as the motionvector predictor (S2204). On the other hand, in a case wheremvp_idx_LX==0 and availableFlagLXCol==1 are not satisfied (No in S2203),in other words, in a case where mvp_idx_LX=!0 or availableFlagLXCol==0,the motion vector predictor candidate can be specified as a spatialmotion vector predictor candidate, and accordingly, a motion vector isderived from the spatial prediction block. In the present invention, theprediction vector candidates are added in order of mvLXCol, mvLXA, andmvLXB, and the priority level of the time motion vector predictorcandidate is set to be the highest. Accordingly, in a case where a timemotion vector predictor candidate is present, mvp_idx_LX==0 isnecessarily satisfied, and, in the case of mvp_idx_LX!=0, a space motionvector predictor candidate can be necessarily specified. In addition, inthe case of availableFlagLXCol==0, it represents that the time motionvector predictor candidate is not present, and accordingly, the motionvector predictor can be specified as a spatial motion vector predictorcandidate. Therefore, in accordance with the values of mvp_idx_LX andavailableFlagLXCol, it can be determined whether the motion vectorpredictor is the time motion vector predictor candidate or the spatialmotion vector predictor candidate.

In a case where the motion vector predictor is determined to be aspatial motion vector predictor candidate (No in S2203), similarly toS303 according to first embodiment illustrated in FIG. 16, a predictionvector candidate is derived from the left prediction block (S2205), anda prediction vector candidate is derived from the upper prediction block(S2206). Subsequently, it is determined whether or not the predictionvector candidate derived from the left prediction block and theprediction vector candidate derived from the upper prediction block arethe same motion vector, and, in a case where the motion vectors are thesame, one thereof is removed (S2207). Finally, a motion vector predictoris selected based on the value of mvp_idx_LX (S2208). Here, in order tofurther reduce the process amount, the spatial motion vector predictorcandidate may be specified based on only availableFlagLXA withoutdetermining the identity of prediction vectors between the spatialmotion vector predictor candidates.

FIG. 23 illustrates the pattern of a motion vector predictor selection(S2208 illustrated in FIG. 22) of a case where a motion vector predictoris determined to be a spatial motion vector predictor candidate (No inS2203 illustrated in FIG. 22). In a case where mvp_idx_LX==0 andavailableFlagLXCol==0, the first spatial candidate is selected. In acase where mvp_idx_LX==1 and availableFlagLXCol==1, the first spatialcandidate is selected. In a case where mvp_idx_LX==1 andavailableFlagLXCol ==0, the second spatial candidate is selected. Inaddition, in a case where a spatial motion vector predictor candidate isnot present in each condition, the motion vector predictor is set to (0,0).

As in the second embodiment, by specifying a motion vector predictorwithout constructing a motion vector predictor list, the same predictionvector as that of a case where decoding is performed in accordance withthe first embodiment is acquired, and, additionally, there are thefollowing advantages.

Based on the values of mvp_idx_LX and availableFlagLXCol, it can bedetermined whether the motion vector predictor is a time motion vectorpredictor candidate or a spatial motion vector predictor candidate.Accordingly, only one of the prediction vector deriving process of thetime motion vector predictor candidate and the prediction vectorderiving process of the spatial motion vector predictor candidate may beperformed. Therefore, the decoding processing amount is about a half ofa case where both the time motion vector predictor candidate and thespatial motion vector predictor candidate are derived. Accordingly, theexecution speed is raised from the viewpoint of the software, and thepower consumption can be reduced from the viewpoint of the hardware.

In addition, in a case where the motion vector predictor list isconstructed, in a case where the scaling calculation of the motionvector predictor is necessary for each of the time motion vectorpredictor candidate and the spatial motion vector predictor candidate,in the first embodiment, it is necessary to perform the scalingcalculation once for deriving the time motion vector predictor candidateand once for deriving the spatial motion vector predictor candidateonce. However, in the second embodiment, one of the prediction vectorderiving process of the time motion vector predictor candidate and theprediction vector deriving process of the spatial motion vectorpredictor candidate is selected and is performed, and accordingly, themotion vector predictor can be derived by performing the scalingcalculation once on the decoding side. Accordingly, particularly, ascaling circuit required to perform division using hardware can becommonly used for deriving the time motion vector predictor candidateand for deriving spatial motion vector predictor candidate, whereby thecircuit scale can be reduced.

In addition, since the decoding result according to the first embodimentof the present invention and the decoding result according to the secondembodiment are the same, the architecture may be selected on thedecoding side. In other words, in a case where the same configuration isdesired on the coding side and the decoding side as in a system such asa camcorder in which the coding device and the decoding device areintegrated, as in the first embodiment, the motion vector predictor maybe specified by constructing the list of motion vector predictors. Onthe other hand, in a case where only the reduction of the processingamount on the decoding side is of significance, as in the secondembodiment, after a time candidate or a spatial candidate is specifiedwithout constructing a list of motion vector predictors, the motionvector predictor may be specified by operating only one of the derivingof the spatial candidate and the deriving of the time candidate.

The points of the embodiment bringing such advantages of the presentinvention are the following two points.

1. The time motion vector predictor candidate (one candidate) is set tohave a priority level higher than that of the spatial motion vectorpredictor candidates (two candidates).2. The redundant candidate removing process of a case where the motionvector predictors are the same is not performed between the time motionvector predictor candidates and the spatial motion vector predictorcandidates (the redundant candidate removing process is allowed onlybetween the spatial motion vector predictor candidates).

In other words, the priority level of the time motion vector predictorcandidate capable of uniquely determining whether or not the motionvector predictor candidate is present based on the time motion vectorpredictor candidate usability flag availableFlagLXCol used for a singlemotion vector predictor candidate is set to be high, the priority levelof the spatial motion vector predictor that has a plurality of motionvector predictor candidates and has the number of motion vectorpredictor candidates to be changeable is set to be low, and the motionvector predictor is added to the list of the motion vector predictors,which is a distinctive feature. Among the spatial motion vectorpredictor candidates, redundant candidates are removed based on theidentity determination, and accordingly, the priority level thereof isset to be low on the motion vector predictor candidate list so as to beadded at a low rank. On the other hand, since the identity determinationis not made between the time motion vector predictor candidate and thespatial motion vector predictor candidate, the time motion vectorpredictor candidate is configured to have a high priority level on themotion vector predictor candidate list so as to be added at a high rank.Accordingly, the spatial motion vector predictor and the time motionvector predictor can be separated on the list, and the degree ofseparation between the spatial direction and the time direction israised in the motion vector prediction, and the efficiency of theprocess is improved, and the circuit scale is reduced.

The bitstream of a moving picture output by the moving picture codingdevice according to the embodiment described above has a specific dataformat so as to be decoded in accordance with the coding method used inthe embodiment, and accordingly, the moving picture decoding devicecorresponding to the moving picture coding device can decode thebitstream of the specific data format.

In a case where a wired or wireless network is used for exchanging abitstream between the moving picture coding device and the movingpicture decoding device, the bitstream may be converted into a dataformat that is appropriate for the transmission form in a communicationpath and be transmitted. In such a case, a moving picture transmissiondevice is disposed, which converts a bitstream output by the movingpicture coding device into coding data of a data format that isappropriate to the transmission form in the communication path, and amoving picture reception device is disposed, which receives the codingdata from the network, restores the bitstream from the coding data, andsupplies the restored bitstream to the moving picture decoding device.

The moving picture transmission device includes: a memory that buffers abitstream output by the moving picture coding device; a packetprocessing unit that packetizes the bitstream; and a transmission unitthat transmits packetized coding data through a network. The movingpicture reception device includes: a reception unit that receivespacketized coding data through a network; a memory that buffers thereceived coding data; and a packet processing unit that generates abitstream by performing a packet process of coding data and supplies thegenerated bitstream to the moving picture decoding device.

The processes relating to the coding and decoding described above may berealized not only as a transmission/storage/reception device usinghardware but also by firmware stored in a read only memory (ROM), aflash memory, or the like or software of a computer or the like. Thefirmware or the software program may be provided with being recorded ina recording medium that can be read by a computer or the like, may beprovided from a server through a wired or wireless network, or may beprovided as data broadcasting of satellite digital broadcasting.

As above, the present invention has been described based on theembodiments. However, such embodiments are merely examples, and it isunderstood to a person skilled in the art that various modifications maybe made in each constituent element thereof or a combination of eachprocess sequence, and such modified examples also belong to the scope ofthe present invention.

[Item 1]

A moving picture coding device that codes a moving picture using motioncompensation in units of blocks acquired by dividing each picture of themoving picture, the moving picture coding device comprising:

a motion vector predictor candidate generating unit configured to derivea plurality of motion vector predictor candidates by making a predictionbased on a motion vector of one of coded blocks that are neighboring toa coding target block in space or time and construct a motion vectorpredictor candidate list;

a motion vector predictor redundant candidate removing unit configuredto remove the motion vector predictor candidates having identity amongthe motion vector predictor candidates predicted based on a coded blockthat is neighboring in space from the motion vector predictor candidatelist with at least one being left;

a motion vector predictor selecting unit configured to select a motionvector predictor from the motion vector predictor candidate list;

a differential vector calculating unit configured to calculate a motionvector difference based on a difference between the selected motionvector predictor and the motion vector used for motion compensation; anda coding unit configured to code information representing the selectedmotion vector predictor together with the motion vector difference.

[Item 2]

A moving picture coding device that codes a moving picture using motioncompensation in units of blocks acquired by dividing each picture of themoving picture, the moving picture coding device comprising:

a motion vector predictor candidate generating unit configured to derivea plurality of motion vector predictor candidates by making a predictionbased on a motion vector of one of coded blocks that are neighboring toa coding target block in space or time and construct a motion vectorpredictor candidate list;

a motion vector predictor redundant candidate removing unit configuredto remove the motion vector predictor candidates having a same motionvector value among the motion vector predictor candidates predictedbased on a coded block that is neighboring in space from the motionvector predictor candidate list with one being excluded;

a motion vector predictor selecting unit configured to select a motionvector predictor from the motion vector predictor candidate list;

a differential vector calculating unit configured to calculate a motionvector difference based on a difference between the selected motionvector predictor and the motion vector used for motion compensation; and

a coding unit configured to code information representing the selectedmotion vector predictor together with the motion vector difference.

[Item 3]

The moving picture coding device according to item 1 or 2, wherein themotion vector predictor candidate generating unit adds a motion vectorpredictor candidate predicted based on a coded block that is neighboringin time and a motion vector predictor candidate predicted based on acoded block that is neighboring in space to the motion vector predictorcandidate list in the described order.

[Item 4]

A moving picture coding method for coding a moving picture using motioncompensation in units of blocks acquired by dividing each picture of themoving picture, the moving picture coding method comprising:

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of coded blocks that areneighboring to a coding target block in space or time and constructing amotion vector predictor candidate list;

removing the motion vector predictor candidates having identity amongthe motion vector predictor candidates predicted based on a coded blockthat is neighboring in space from the motion vector predictor candidatelist with at least one being left;

selecting a motion vector predictor from the motion vector predictorcandidate list;

calculating a motion vector difference based on a difference between theselected motion vector predictor and the motion vector used for motioncompensation; and

coding information representing the selected motion vector predictortogether with the motion vector difference.

[Item 5]

A moving picture coding method for coding a moving picture using motioncompensation in units of blocks acquired by dividing each picture of themoving picture, the moving picture coding method comprising:

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of coded blocks that areneighboring to a coding target block in space or time and constructing amotion vector predictor candidate list;

removing the motion vector predictor candidates having a same motionvector value among the motion vector predictor candidates predictedbased on a coded block that is neighboring in space from the motionvector predictor candidate list with one being excluded;

selecting a motion vector predictor from the motion vector predictorcandidate list;

calculating a motion vector difference based on a difference between theselected motion vector predictor and the motion vector used for motioncompensation; and

coding information representing the selected motion vector predictortogether with the motion vector difference.

[Item 6]

A moving picture coding program for coding a moving picture using motioncompensation in units of blocks acquired by dividing each picture of themoving picture, the moving picture coding program causes a computer toperform:

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of coded blocks that areneighboring to a coding target block in space or time and constructing amotion vector predictor candidate list;

removing the motion vector predictor candidates having identity amongthe motion vector predictor candidates predicted based on a coded blockthat is neighboring in space from the motion vector predictor candidatelist with at least one being left;

selecting a motion vector predictor from the motion vector predictorcandidate list;

calculating a motion vector difference based on a difference between theselected motion vector predictor and the motion vector used for motioncompensation; and

coding information representing the selected motion vector predictortogether with the motion vector difference.

[Item 7]

A moving picture coding program for coding a moving picture using motioncompensation in units of blocks acquired by dividing each picture of themoving picture, the moving picture coding program causes a computer toperform:

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of coded blocks that areneighboring to a coding target block in space or time and constructing amotion vector predictor candidate list;

removing the motion vector predictor candidates having a same motionvector value among the motion vector predictor candidates predictedbased on a coded block that is neighboring in space from the motionvector predictor candidate list with one being excluded;

selecting a motion vector predictor from the motion vector predictorcandidate list;

calculating a motion vector difference based on a difference between theselected motion vector predictor and the motion vector used for motioncompensation; and

coding information representing the selected motion vector predictortogether with the motion vector difference.

[Item 8]

A moving picture decoding device that decodes a bitstream in which amoving picture is coded using motion compensation in units of blocksacquired by dividing each picture of the moving picture, the movingpicture decoding device comprising:

a decoding unit configured to decode information representing a motionvector predictor to be selected together with a motion vectordifference;

a motion vector predictor candidate generating unit configured to derivea plurality of motion vector predictor candidates by making a predictionbased on a motion vector of one of decoded blocks that are neighboringto a decoding target block in space or time and construct a motionvector predictor candidate list;

a motion vector predictor redundant candidate removing unit configuredto remove the motion vector predictor candidates having identity amongthe motion vector predictor candidates predicted based on a decodedblock that is neighboring in space from the motion vector predictorcandidate list with at least one being left;

a motion vector predictor selecting unit configured to select a motionvector predictor from the motion vector predictor candidate list basedon information representing the decoded motion vector predictor to beselected; and

a motion vector calculating unit configured to calculate a motion vectorused for motion compensation by adding the selected motion vectorpredictor and the motion vector difference together.

[Item 9]

A moving picture decoding device that decodes a bitstream in which amoving picture is coded using motion compensation in units of blocksacquired by dividing each picture of the moving picture, the movingpicture decoding device comprising:

a decoding unit configured to decode information representing a motionvector predictor to be selected together with a motion vectordifference;

a motion vector predictor candidate generating unit configured to derivea plurality of motion vector predictor candidates by making a predictionbased on a motion vector of one of decoded blocks that are neighboringto a decoding target block in space or time and construct a motionvector predictor candidate list;

a motion vector predictor redundant candidate removing unit configuredto remove the motion vector predictor candidates having a same motionvector value among the motion vector predictor candidates predictedbased on a decoded block that is neighboring in space from the motionvector predictor candidate list with one being excluded;

a motion vector predictor selecting unit configured to select a motionvector predictor from the motion vector predictor candidate list basedon information representing the decoded motion vector predictor to beselected; and

a motion vector calculating unit configured to calculate a motion vectorused for motion compensation by adding the selected motion vectorpredictor and the motion vector difference together.

[Item 10]

The moving picture decoding device according to item 8 or 9, wherein themotion vector predictor candidate generating unit adds a motion vectorpredictor candidate predicted based on a coded block that is neighboringin time and a motion vector predictor candidate predicted based on acoded block that is neighboring in space to the motion vector predictorcandidate list in the described order.

[Item 11]

A moving picture decoding method for decoding a bitstream in which amoving picture is coded using motion compensation in units of blocksacquired by dividing each picture of the moving picture, the movingpicture decoding method comprising:

decoding information representing a motion vector predictor to beselected together with a motion vector difference;

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of decoded blocks that areneighboring to a decoding target block in space or time and constructinga motion vector predictor candidate list;

removing the motion vector predictor candidates having identity amongthe motion vector predictor candidates predicted based on a decodedblock that is neighboring in space from the motion vector predictorcandidate list with at least one being left;

selecting a motion vector predictor from the motion vector predictorcandidate list based on information representing the decoded motionvector predictor to be selected; and

calculating a motion vector used for motion compensation by adding theselected motion vector predictor and the motion vector differencetogether.

[Item 12]

A moving picture decoding method for decoding a bitstream in which amoving picture is coded using motion compensation in units of blocksacquired by dividing each picture of the moving picture, the movingpicture decoding method comprising:

decoding information representing a motion vector predictor to beselected together with a motion vector difference;

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of decoded blocks that areneighboring to a decoding target block in space or time and constructinga motion vector predictor candidate list;

removing the motion vector predictor candidates having a same motionvector value among the motion vector predictor candidates predictedbased on a decoded block that is neighboring in space from the motionvector predictor candidate list with one being excluded;

selecting a motion vector predictor from the motion vector predictorcandidate list based on information representing the decoded motionvector predictor to be selected; and

calculating a motion vector used for motion compensation by adding theselected motion vector predictor and the motion vector differencetogether.

[Item 13]

A moving picture decoding program for decoding a bitstream in which amoving picture is coded using motion compensation in units of blocksacquired by dividing each picture of the moving picture, the movingpicture decoding program causes a computer to perform:

decoding information representing a motion vector predictor to beselected together with a motion vector difference;

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of decoded blocks that areneighboring to a decoding target block in space or time and constructinga motion vector predictor candidate list;

removing the motion vector predictor candidates having identity amongthe motion vector predictor candidates predicted based on a decodedblock that is neighboring in space from the motion vector predictorcandidate list with at least one being left;

selecting a motion vector predictor from the motion vector predictorcandidate list based on information representing the decoded motionvector predictor to be selected; and

calculating a motion vector used for motion compensation by adding theselected motion vector predictor and the motion vector differencetogether.

[Item 14]

A moving picture decoding program for decoding a bitstream in which amoving picture is coded using motion compensation in units of blocksacquired by dividing each picture of the moving picture, the movingpicture decoding program causes a computer to perform:

decoding information representing a motion vector predictor to beselected together with a motion vector difference;

deriving a plurality of motion vector predictor candidates by making aprediction based on a motion vector of one of decoded blocks that areneighboring to a decoding target block in space or time and constructinga motion vector predictor candidate list;

removing the motion vector predictor candidates having a same motionvector value among the motion vector predictor candidates predictedbased on a decoded block that is neighboring in space from the motionvector predictor candidate list with one being excluded;

selecting a motion vector predictor from the motion vector predictorcandidate list based on information representing the decoded motionvector predictor to be selected; and

calculating a motion vector used for motion compensation by adding theselected motion vector predictor and the motion vector differencetogether.

What is claimed is:
 1. A moving picture coding device that codes amoving picture using motion compensation in units of blocks acquired bydividing each picture of the moving picture, the moving picture codingdevice comprising: a motion vector predictor candidate generating unitconfigured to derive a plurality of motion vector predictor candidatesby making a prediction based on a motion vector of one of coded blocksthat are neighboring to a coding target block in space or time andconstruct a motion vector predictor candidate list; a motion vectorpredictor redundant candidate removing unit configured to comparewhether values of vectors are the same among motion vector predictorcandidates predicted from a coded block neighboring in space and removethe motion vector predictor candidates having the same values of vectorsfrom the motion vector predictor candidate list with at least one beingleft without comparing whether or not a value of vector of a motionvector predictor predicted from a coded block that is neighboring inspace and a value of vector of a motion vector predictor predicted froma coded block neighboring in time are the same; a motion vectorpredictor selecting unit configured to select a motion vector predictorfrom the motion vector predictor candidate list; a differential vectorcalculating unit configured to calculate a motion vector differencebased on a difference between the selected motion vector predictor andthe motion vector used for motion compensation; and a coding unitconfigured to code information representing the selected motion vectorpredictor together with the motion vector difference.
 2. A transmissiondevice comprising: a packet processing unit configured to acquire codingdata by packetizing a bitstream coded using a moving picture codingmethod for coding a moving picture by using motion compensation in unitsof blocks acquired by partitioning each picture of the moving picture;and a transmission unit configured to transmit the packetized codingdata, wherein the moving picture coding method includes: deriving aplurality of motion vector predictor candidates by making a predictionbased on a motion vector of one of coded blocks that are neighboring toa coding target block in space or time and constructing a motion vectorpredictor candidate list; comparing whether values of vectors are thesame among motion vector predictor candidates predicted from a codedblock neighboring in space and removing the motion vector predictorcandidates having the same values of vectors from the motion vectorpredictor candidate list with at least one being left without comparingwhether or not a value of vector of a motion vector predictor predictedfrom a coded block that is neighboring in space and a value of vector ofa motion vector predictor predicted from a coded block neighboring intime are the same; selecting a motion vector predictor from the motionvector predictor candidate list; calculating a motion vector differencebased on a difference between the selected motion vector predictor andthe motion vector used for motion compensation; and coding informationrepresenting the selected motion vector predictor together with themotion vector difference.
 3. A transmission method comprising: acquiringcoding data by packetizing a bitstream coded using a moving picturecoding method for coding a moving picture by using motion compensationin units of blocks acquired by partitioning each picture of the movingpicture; and transmitting the packetized coding data, wherein the movingpicture coding method includes: deriving a plurality of motion vectorpredictor candidates by making a prediction based on a motion vector ofone of coded blocks that are neighboring to a coding target block inspace or time and constructing a motion vector predictor candidate list;comparing whether values of vectors are the same among motion vectorpredictor candidates predicted from a coded block neighboring in spaceand removing the motion vector predictor candidates having the samevalues of vectors from the motion vector predictor candidate list withat least one being left without comparing whether or not a value ofvector of a motion vector predictor predicted from a coded block that isneighboring in space and a value of vector of a motion vector predictorpredicted from a coded block neighboring in time are the same; selectinga motion vector predictor from the motion vector predictor candidatelist; calculating a motion vector difference based on a differencebetween the selected motion vector predictor and the motion vector usedfor motion compensation; and coding information representing theselected motion vector predictor together with the motion vectordifference.